Re: [whatwg/fetch] Add getStructured/setStructured to Headers (PR #1943)

@martinthomson commented on this pull request.



> +  constrained profile of string rather than a separate type. When serializing
+  via {{Headers/setStructured()}}, strings that conform to
+  <a>structured field token</a> syntax are serialized as tokens; all other
+  strings are serialized as quoted structured field strings.

This string->token implicit conversion is not going to work for some uses of the API.  Is it possible to override the type?  For instance, by adding a value as `{value: "v", sfType: "string"}` or something like that?  Otherwise, there are cases where a SF-defined value will expect a string and get a token that it will choke one.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1943#pullrequestreview-4849964947
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1943/review/4849964947@github.com>

Received on Tuesday, 4 August 2026 02:05:58 UTC