RequestMethod
Enum RequestMethod.
Description
Represents the set of valid HTTP request methods as defined by the IETF RFC 7231 and related specifications. This enum SHALL be used to strictly define supported request methods within HTTP client and server implementations. Each case corresponds to a standardized HTTP method, expressed as an uppercase string literal.
Implementations utilizing this enum MUST validate incoming or outgoing request methods against this set to ensure protocol compliance and interoperability.
Cases
The CONNECT method establishes a tunnel to the target resource, often used with HTTPS proxies.
The DELETE method removes the specified resource.
The GET method requests a representation of the specified resource. It MUST NOT have side-effects.
The HEAD method requests the headers for a given resource without the response body.
The OPTIONS method describes the communication options for the target resource.
The PATCH method applies partial modifications to the target resource.
The POST method submits data to be processed, often causing a change in state or side-effects.
The PURGE method requests that a cached resource be removed, often used with proxy servers.
The PUT method replaces the target resource with the request payload.
The TRACE method performs a message loop-back test along the path to the target resource.
Methods
Returns true if the method is considered cacheable by default.
Returns true if the method is idempotent (multiple identical requests have the same effect as a single one).
Returns true if the method is considered safe (does not modify server state).
The HEAD method requests the headers for a given resource without the response body.
The GET method requests a representation of the specified resource. It MUST NOT have side-effects.
The POST method submits data to be processed, often causing a change in state or side-effects.
The PUT method replaces the target resource with the request payload.
The PATCH method applies partial modifications to the target resource.
The DELETE method removes the specified resource.
The PURGE method requests that a cached resource be removed, often used with proxy servers.
The OPTIONS method describes the communication options for the target resource.
The TRACE method performs a message loop-back test along the path to the target resource.
The CONNECT method establishes a tunnel to the target resource, often used with HTTPS proxies.
Returns true if the method is considered cacheable by default.
public
isCacheable() : bool
Return values
Returns true if the method is idempotent (multiple identical requests have the same effect as a single one).
public
isIdempotent() : bool
Return values
Returns true if the method is considered safe (does not modify server state).
public
isSafe() : bool