http_method_enum 0.0.2 copy "http_method_enum: ^0.0.2" to clipboard
http_method_enum: ^0.0.2 copied to clipboard

Minimal enum for common application HTTP methods (GET, HEAD, POST, PUT, PATCH, DELETE). For API contracts and REST semantics, not full IANA method coverage.

Motivation #

Provides a single canonical HttpMethod enum type that can be shared across packages, e.g., between client and server code (API contracts).

Has the following methods:

enum HttpMethod { get, head, post, put, patch, delete }

Is this reinventing the wheel? #

http_methods provides a full list of registered HTTP methods and indicates whether each method is considered safe according to specifications.

This package is more minimal for typical API clients and providers, exposing only the most commonly used HTTP methods as an enum instead of a list.

This package does not provide full IANA method coverage.

0
likes
150
points
34
downloads

Documentation

API reference

Publisher

verified publisherechoellet.dev

Weekly Downloads

Minimal enum for common application HTTP methods (GET, HEAD, POST, PUT, PATCH, DELETE). For API contracts and REST semantics, not full IANA method coverage.

Repository (GitHub)
View/report issues

Topics

#http #network

License

MIT (license)

More

Packages that depend on http_method_enum