You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, a developer might use an abstraction that either does not provide any constants at all, or only provides a subset of the constants required for the specific case.
29
+
30
+
The excellent library [`teapot/status-code`](https://github.com/teapot-php/status-code) already provides HTTP status codes that are standardized by RFCs, as well as a range of vendor-specific HTTP status codes.
31
+
32
+
In a similar fashion, this library here aims to provide a collection of interfaces with constants for HTTP request methods that are standardized by RFCs, as well as additional vendor-specific HTTP request methods.
The interface `Localheinz\Http\Method` provides constants for all of the HTTP request methods:
44
+
The interface [`Localheinz\Http\Method`](/src/Method.php) provides constants for all of the HTTP request methods that are standardized by
45
+
46
+
*[RFC 5789](https://tools.ietf.org/html/rfc5789)
47
+
*[RFC 7231](https://tools.ietf.org/html/rfc7231)
48
+
49
+
namely
20
50
21
51
*`CONNECT`
22
52
*`DELETE`
@@ -25,23 +55,78 @@ The interface `Localheinz\Http\Method` provides constants for all of the HTTP re
25
55
*`OPTIONS`
26
56
*`PATCH`
27
57
*`POST`
28
-
*`PURGE`
29
58
*`PUT`
30
59
*`TRACE`
31
60
32
-
Import the interface and use the constants instead of using magic strings:
61
+
The interface [`Localheinz\Http\Method\WebDav`](/src/Method/WebDav.php) provides constants for all of the HTTP request methods that are standardized by
62
+
63
+
-[RFC 3648](https://tools.ietf.org/html/rfc3648)
64
+
-[RFC 3744](https://tools.ietf.org/html/rfc3744)
65
+
-[RFC 4437](https://tools.ietf.org/html/rfc4437)
66
+
-[RFC 4791](https://tools.ietf.org/html/rfc4791)
67
+
-[RFC 4918](https://tools.ietf.org/html/rfc4918)
68
+
-[RFC 5323](https://tools.ietf.org/html/rfc5323)
69
+
-[RFC 5789](https://tools.ietf.org/html/rfc5789)
70
+
-[RFC 5842](https://tools.ietf.org/html/rfc5842)
71
+
-[RFC 7231](https://tools.ietf.org/html/rfc7231)
72
+
73
+
namely
74
+
75
+
-`ACL`
76
+
-`BIND`
77
+
-`CONNECT`
78
+
-`COPY`
79
+
-`DELETE`
80
+
-`GET`
81
+
-`HEAD`
82
+
-`LOCK`
83
+
-`MKCALENDAR`
84
+
-`MKCOL`
85
+
-`MKREDIRECTREF`
86
+
-`MOVE`
87
+
-`OPTIONS`
88
+
-`ORDERPATCH`
89
+
-`PATCH`
90
+
-`POST`
91
+
-`PROPFIND`
92
+
-`PROPPATCH`
93
+
-`PUT`
94
+
-`REBIND`
95
+
-`SEARCH`
96
+
-`TRACE`
97
+
-`UNBIND`
98
+
-`UNLOCK`
99
+
-`UPDATEREDIRECTREF`
100
+
101
+
The interface [`Localheinz\Http\Method\Vendor\SquidCache`](/src/Method/Vendor/SquidCache.php) provides constants for a suggest HTTP request method used for purging items from the cache,
102
+
namely
103
+
104
+
-`PURGE`
105
+
106
+
The interface [`Localheinz\Http\Method\Vendor\VarnishCache`](/src/Method/Vendor/VarnishCache.php) provides constants for a suggest HTTP request method used for invalidating and purging items from the cache, namely
107
+
108
+
-`BAN`
109
+
-`PURGE`
110
+
111
+
To use these constants, import the interfaces and refer to the constants instead of using magic strings:
0 commit comments