-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
natively support Structured Field Values #2654
Comments
Hi @Jxck ! It's very interesting, and your library seems very good. If we implement it, we will add the feature to |
Hi @yusukebe What do you think about implementing structured field values (SFV) following the RFC 8941 for our headers? It could streamline our communication, making it more standardized and efficient. Some points to think about:
However, there is a con. This may take a while because many programmers don't know SFV. |
What is the feature you are proposing?
Structured Field Values is the standard spec for serialize structured object into http header value.
It already referrered by tons of newly defined http specs.
And also, IETF HTTP Working Group currently working on retrofit SFV with existing headers.
So we can say it's a best practice to use SFV for headers, not JSON in any headers.
For avoiding developer using JSON or any other format, or SFV like format via hand-made-string-concat, Hono can natively support SFV encoder/decoder and guide developer to use it.
for example.
can be type gurded, by require SFList for value when key is
Cache-Status
.FYI: I published typed SFV library to npm https://github.com/jxck/structured-field-values
Thanks.
The text was updated successfully, but these errors were encountered: