Class HttpMethod
java.lang.Object
org.springframework.http.HttpMethod
- All Implemented Interfaces:
- Serializable,- Comparable<HttpMethod>
Represents an HTTP request method. Intended for use
 with 
ClientHttpRequest
 and RestTemplate.- Since:
- 3.0
- Author:
- Arjen Poutsma, Juergen Hoeller
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HttpMethodThe HTTP methodDELETE.static final HttpMethodThe HTTP methodGET.static final HttpMethodThe HTTP methodHEAD.static final HttpMethodThe HTTP methodOPTIONS.static final HttpMethodThe HTTP methodPATCH.static final HttpMethodThe HTTP methodPOST.static final HttpMethodThe HTTP methodPUT.static final HttpMethodThe HTTP methodTRACE.
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(HttpMethod other) booleaninthashCode()booleanDetermine whether thisHttpMethodmatches the given method value.name()Return the name of this method, for example, "GET", "POST".toString()static HttpMethodReturn anHttpMethodobject for the given value.static HttpMethod[]values()Returns an array containing the standard HTTP methods.
- 
Field Details- 
GET
- 
HEAD
- 
POST
- 
PUT
- 
PATCH
- 
DELETE
- 
OPTIONS
- 
TRACE
 
- 
- 
Method Details- 
values
- 
valueOfReturn anHttpMethodobject for the given value.- Parameters:
- method- the method value as a String
- Returns:
- the corresponding HttpMethod
 
- 
nameReturn the name of this method, for example, "GET", "POST".
- 
matchesDetermine whether thisHttpMethodmatches the given method value.- Parameters:
- method- the HTTP method as a String
- Returns:
- trueif it matches,- falseotherwise
- Since:
- 4.2.4
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<HttpMethod>
 
- 
hashCode
- 
equals
- 
toString
 
-