-
Notifications
You must be signed in to change notification settings - Fork 82
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 server support for Connect HTTP GET requests #624
Conversation
It's necessary to handle parsing and decoding URL query parameters ourselves due to the fact that JavaScript/the DOM lack the functionality needed to handle potentially binary data in URL-encoded form. In the future, we may be able to improve performance by determining if we need to do this using a regular expression.
Final consensus pending, but it can always be reverted later.
…hadwick/unary-get-support
…uild/connect-es into jchadwick/unary-get-server
…hadwick/unary-get-server
…hadwick/unary-get-server
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.
Hey John, just two code style comments from me. I believe this is ready to merge otherwise.
Some more tests would be nice to have, so I put up #629, based on this PR.
import { parseTimeout } from "./parse-timeout.js"; | ||
import { paramMessage, paramBase64 } from "./query-params.js"; |
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.
Can you merge with import statement on line 73? The TypeScript language service can do that. Your IDE should have a command to organize imports.
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.
I ran organize imports. I didn't really realize it handled our import style correctly, because some other tsserver functions don't seem to handle it very well. Thanks for the tip.
Co-authored-by: Timo Stamm <ts@timostamm.de>
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.
LGTM, thank you for this!
Please add a PR description so our release changelog is comprehensible.
Thanks for your help + additional tests! |
Adds support for handling Connect HTTP GET requests in servers. We also expose
protocolName
andrequestMethod
on handler context so that handlers can know how the RPC request was initiated.