Support for arbitrary HTTP methods #1
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, HTTP request methods are limited to a predefined number of verbs from the HttpMethod enum.
This has two problems:
https://www.php-fig.org/psr/psr-7/
It makes the library unusable for protocols that build upon HTTP but add their own verbs on top, e.g. WebDAV.
IMHO, the HTTP request method should be stored as a string.
The
HttpStatus
enum, on the other hand, already contains WebDAV status codes, likehttps://git.andrewlalis.com/Handy-Http/primitives/src/commit/23c74f82bedf662d3d6f8f2aed159a270f5a782d/source/handy_http_primitives/response.d#L81-L83
and AFAICT can be used in a way to allow arbitrary response codes as-is, thus doesn’t have this issue.
Yep, you're right; I'm changing the type to
const string method;
. But I will still provideenum HttpMethod : string
as a convenience for common methods.