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

Expose more HTTP methods as convenience filters, eg PATCH, HEAD #11

Closed
kamalmarhubi opened this issue Aug 2, 2018 · 2 comments
Closed

Comments

@kamalmarhubi
Copy link
Contributor

kamalmarhubi commented Aug 2, 2018

I'm not sure what the right line is for which ones merit convenience filters, but at least PATCH I'd think. Alternatively, given the small number, all could be exposed.

List of methods:

  • ✔️ GET
  • HEAD this could be promoted, I think
  • ✔️ POST
  • ✔️ PUT
  • ✔️ DELETE
  • CONNECT(pretty niche for use cases of warp?)
  • OPTIONS (again, niche for use cases of warp)
  • TRACE don't think this is worth it, unless exposing all methods
  • PATCH I think this one should be promoted

(I'm ignoring webdav and any other such protocols on top of HTTP here.)

@kamalmarhubi
Copy link
Contributor Author

Ah, looks like these are exactly the methods that http considers first class: the PATCH extension is included as a variant, but all others are grabbed by Extension (source). This makes me think that including these makes sense.

@seanmonstar
Copy link
Owner

Yea, could probably promote a few. I wanted the most common ones to be easy to use, and the current 4 are definitely the the 95ish percent.

kamalmarhubi added a commit to kamalmarhubi/warp that referenced this issue Aug 11, 2018
Add `method::v2`-style filters for these methods, exposing them at the
top level without a `2` suffix. Among HTTP methods defined in RFC 7231
methods, this leaves `TRACE` and `CONNECT` without filters.

refs seanmonstar#11
kamalmarhubi added a commit to kamalmarhubi/warp that referenced this issue Aug 11, 2018
Add `method::v2`-style filters for these methods, exposing them at the
top level without a `2` suffix. Among HTTP methods defined in RFC 7231
methods, this leaves `TRACE` and `CONNECT` without filters.

refs seanmonstar#11
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

No branches or pull requests

2 participants