Skip to content
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

jhttp: extend and simplify request processing hooks #65

Merged
merged 4 commits into from
Dec 4, 2021

Conversation

creachadair
Copy link
Owner

Add a new hook to the Bridge options to allow the caller to handle parsing the
HTTP request into JSON-RPC requests. Remove the old content-type check hook.

The request check hook remains, but setting either it or the new parse hook
disables the default method POST and content-type checks; the hooks are now
fully responsible for checking the structure of the request.

Without either of these hooks set, the default behaviour does not change.

Add a new hook to the Bridge options to allow the caller to handle parsing the
HTTP request into JSON-RPC requests. Remove the old content-type check hook.

The request check hook remains, but setting either it or the new parse hook
disables the default method POST and content-type checks; the hooks are now
fully responsible for checking the structure of the request.

Without either of these hooks set, the default behaviour does not change.
@creachadair creachadair added the enhancement New feature or request label Dec 4, 2021
@creachadair creachadair merged commit d299fef into default Dec 4, 2021
@creachadair creachadair deleted the mjf/angus-the-bridge-builder branch December 4, 2021 22:13
creachadair added a commit that referenced this pull request Dec 4, 2021
This version contains breaking changes in the jhttp.Bridge type.
It is otherwise non-breaking with previous versions.

- jhttp: add a request-check hook
- Add goroutine leak checking to unit tests. (#64)
- jhttp: extend and simplify request processing hooks (#65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant