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

fix: make req.respond() exclusive #73

Merged
merged 3 commits into from
Feb 8, 2020
Merged

fix: make req.respond() exclusive #73

merged 3 commits into from
Feb 8, 2020

Conversation

keroxp
Copy link
Owner

@keroxp keroxp commented Feb 8, 2020

  • BREAKING CHANGE: req.writeTrailer() now remove.
    • use trailers options in ServerResponse
  • fix: ServerRequest.respond() is now exclusive.

Now code like below are valid handler for ServeHandler but is not recommended.

listenAndServe({...}, async req => {
  // await is optional within handler
  req.respond({status: 200, body: "ok"})
});

@keroxp keroxp merged commit 89a7aa5 into master Feb 8, 2020
@keroxp keroxp deleted the responder-refactor branch February 8, 2020 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant