- From: Jeffrey Yasskin <notifications@github.com>
- Date: Thu, 15 Jun 2023 20:39:10 +0000 (UTC)
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/1672/1593695732@github.com>
Ok, there is a definition, but "Specifications ... can refer its field value as a "structured header value", "structured trailer value", or "structured field value" as necessary." doesn't give enough information to know what to pass to "set a structured field value". E.g. is the field value the ascii serialization or the parsed value? If you think hard or read the algorithm, it's clear it has to be the parsed value, with its type, but novice spec authors shouldn't have to (and don't) think hard when they want to call this. It would help some to infer types from: <dl> <dt> [Lists](https://httpwg.org/specs/rfc8941.html#list) <dd> [list](https://infra.spec.whatwg.org/#list) <dt> [Dictionaries](https://httpwg.org/specs/rfc8941.html#dictionary) <dd> [ordered maps](https://infra.spec.whatwg.org/#ordered-map) <dt> [Integers](https://httpwg.org/specs/rfc8941.html#integer) <dd> [long long](https://webidl.spec.whatwg.org/#idl-long-long) (but the range is less than long long, and folks might pass other integral types) <dt> [Decimals](https://httpwg.org/specs/rfc8941.html#decimal) <dd> [double](https://webidl.spec.whatwg.org/#idl-double) (but the range is less than double, and floats also work) <dt> [Strings](https://httpwg.org/specs/rfc8941.html#string) <dd> [ASCII string](https://infra.spec.whatwg.org/#ascii-string) <dt> [Tokens](https://httpwg.org/specs/rfc8941.html#token) <dd> [ASCII string](https://infra.spec.whatwg.org/#ascii-string) ?? <dt> [Byte Sequences](https://httpwg.org/specs/rfc8941.html#binary) <dd> [byte sequences](https://infra.spec.whatwg.org/#byte-sequence) <dt> [Booleans](https://httpwg.org/specs/rfc8941.html#boolean) <dd> [boolean](https://infra.spec.whatwg.org/#boolean) </dl> But this leaves out [Parameters](https://httpwg.org/specs/rfc8941.html#param) entirely, and I think it would be better to just be explicit that the argument needs to be in the [Structured Data Type](https://httpwg.org/specs/rfc8941.html#types) system. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/1672#issuecomment-1593695732 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/issues/1672/1593695732@github.com>
Received on Thursday, 15 June 2023 20:39:15 UTC