Closed zenekron closed 3 years ago
Out of curiosity, what is the use case for having WebDAV extensions in http-types?
Out of curiosity, what is the use case for having WebDAV extensions in http-types?
Besides being able to speak WebDAV itself, there are other tools that reuse subsets of these methods for other purposes.
In my case specifically: I'm porting a small Terraform HTTP backend I wrote from warp to tide, but in order to implement state locking I need to be able to handle LOCK
and UNLOCK
requests (link).
Does this mean you'd also want affordances in tide's router for these methods?
Does this mean you'd also want affordances in tide's router for these methods?
I'm not too sure what you mean by that (not a native English speaker here), but if you're talking about creating methods like tide::Route::get
and tide::Route::post
that wrap around tide::Route::method
, then I think these HTTP methods are uncommon enough that doing so would not bring much benefit.
That being said if you think it's appropriate I can open a PR against tide as well, just let me know.
if you're talking about creating methods like
tide::Route::get
andtide::Route::post
that wrap aroundtide::Route::method
That is indeed what @jbr meant.
I think these HTTP methods are uncommon enough that doing so would not bring much benefit.
I agree with this rationale; I don't think we need to expose shorthands for them, but having them as part of the enum seems reasonable enough.
This PR extends the
Method
enum to add all the missing methods from IANA's HTTP Method Registry. See the issue #331 .Changes:
AsRef<str>
,FromStr
andMethod::is_safe
accordinglyDisplay
to leverageAsRef<str>