-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat: add request and response utils #15
Conversation
Would it be possible to open another PR for documenting them @farnabaz ? |
Also, shouldn't we rename them to getBody(req) that actually use destr by default and having getRawBody() instead? |
Update: More thinking seems reasonable DX wise 😁 |
@atinux I'll create PR for docs. |
I think README is enough for now, cc @pi0 |
Yeah. H2 is pretty much an experimental project now and i don't want to put energy on docs for in development utils. We may later on benefit jsdocs |
@pi0 It may be worth starting off with jsdoc comments as these can be more easily kept up-to-date with changes to API? I am happy to do that if you agree. |
JSDocs seems better that would be nice if you are up to add them :) |
This PR
useQuery
util to parse the query params of request.useBody
util to parse raw and JSON payload of the request.createError
util to support runtime error to support runtime errors like validation errors.