-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add fields.has
to query if a header is present in a fields
#7625
Add fields.has
to query if a header is present in a fields
#7625
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me, but @pchickey should sign-off on this as well
Also, should this also be sent upstream to WebAssembly/wasi-http? |
Yes, I'll make that pr as well. Thanks! |
Upstream pr: WebAssembly/wasi-http#91 |
fields.get
return an optionfields.has
to query if a header is present in a fields
b0ccc7b
to
be26628
Compare
@@ -322,14 +330,14 @@ interface types { | |||
|
|||
/// Set the timeout for the initial connect to the HTTP Server. An error | |||
/// return value indicates that this timeout is not supported. | |||
set-connect-timeout: func(duration: option<duration>) -> result; | |||
set-connect-timeout: func(ms: option<duration>) -> result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not pull these ms
names from upstream and instead fix those upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, thanks for catching this!
…odealliance#7625) * Make `fields.get` return an option * Add `fields.has` * Sync with the upstream wasi-http types.wit * Revert changes to rename duration to ms
#7641) * Make `fields.get` return an option * Add `fields.has` * Sync with the upstream wasi-http types.wit * Revert changes to rename duration to ms
As discussed in WebAssembly/wasi-http#82, it would be nice to be able to know when a header value exists, vs when it's empty.