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

Use native web server APIs #68

Merged
merged 19 commits into from
Sep 2, 2022
Merged

Use native web server APIs #68

merged 19 commits into from
Sep 2, 2022

Conversation

sholladay
Copy link
Owner

@sholladay sholladay commented Mar 28, 2022

Closes #62
Closes #63

This PR updates Pogo to a newer version of the std/http library, which now implements Deno's recently stabilized native APIs for handling HTTP requests. That brings improved performance and web standards compliance.

In the process, we are also updating a lot of Pogo's internals to be even more reliable and consistent.

  • Use Deno's native HTTP server
  • Update to React 18
  • Add support for Deno Deploy
  • Add response.toWeb() for serializing a Pogo response to a web standard response
  • Add server.url to simplify using server.inject() with absolute URLs as required for web request objects
  • Add a custom request.toString() method to make requests easier to log
  • Allow h.response() to take an Error or response
  • Allow more APIs to take URL objects, such as response.redirect()
  • Make server.inject() take a web request and return a web response
  • Use the https://esm.sh CDN for dependencies that aren't on deno.land/x
  • Improve TypeScript types for response.rewritable() and other APIs
  • Improve stack traces and options for Bang errors
  • Assign errors given to Bang methods to error.cause instead of copying their message

 - Add response.toWeb() method for serialization
 - Add server.url to simplify using inject() with absolute URLs as required for web Request objects
 - Allow h.response() to take an Error or response
 - Improve stack traces and options for Bang errors
 - Allow more APIs to take URL objects
 - Make server.inject() take a web Request and return a web Response
 - Use the esm.sh CDN for npm dependencies
 - Improve TypeScript types for response.rewritable() and other APIs
@sholladay sholladay mentioned this pull request Mar 28, 2022
@sholladay sholladay linked an issue Mar 28, 2022 that may be closed by this pull request
snowteamer added a commit to snowteamer/pogo that referenced this pull request Aug 27, 2022
Use native web server APIs
@sholladay sholladay merged commit 2b49d95 into master Sep 2, 2022
@sholladay sholladay deleted the native-http branch September 2, 2022 13:41
@sholladay sholladay mentioned this pull request Sep 20, 2022
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.

Support for React@17 Can I use Pogo with Deno Deploy?
1 participant