HttpMethod Class — netty Architecture
Architecture documentation for the HttpMethod class in HttpMethod.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 9c3b38b3_8817_af7c_c644_2156c607b049["HttpMethod"] 2b356b34_51c8_bc38_5497_64bbab7346b4["HttpMethod.java"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|defined in| 2b356b34_51c8_bc38_5497_64bbab7346b4 d07759a5_d49e_884b_5ea2_b284d842915d["HttpMethod()"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|method| d07759a5_d49e_884b_5ea2_b284d842915d 7cce9b3e_ab2b_be08_4aae_9fd3760aa8a8["String()"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|method| 7cce9b3e_ab2b_be08_4aae_9fd3760aa8a8 fef76e88_f514_32e4_e7a3_5edc76d821b2["AsciiString()"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|method| fef76e88_f514_32e4_e7a3_5edc76d821b2 ec7e455b_f0fb_d703_3ea3_c5ec94c943c1["hashCode()"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|method| ec7e455b_f0fb_d703_3ea3_c5ec94c943c1 bb9b5918_a55d_432e_c6dd_ab75736bb0e3["equals()"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|method| bb9b5918_a55d_432e_c6dd_ab75736bb0e3 69bf289e_e197_4ca3_505a_5d83306de4bc["compareTo()"] 9c3b38b3_8817_af7c_c644_2156c607b049 -->|method| 69bf289e_e197_4ca3_505a_5d83306de4bc
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/HttpMethod.java lines 27–175
public class HttpMethod implements Comparable<HttpMethod> {
private static final String GET_STRING = "GET";
private static final String POST_STRING = "POST";
/**
* The OPTIONS method represents a request for information about the communication options
* available on the request/response chain identified by the Request-URI. This method allows
* the client to determine the options and/or requirements associated with a resource, or the
* capabilities of a server, without implying a resource action or initiating a resource
* retrieval.
*/
public static final HttpMethod OPTIONS = new HttpMethod("OPTIONS");
/**
* The GET method means retrieve whatever information (in the form of an entity) is identified
* by the Request-URI. If the Request-URI refers to a data-producing process, it is the
* produced data which shall be returned as the entity in the response and not the source text
* of the process, unless that text happens to be the output of the process.
*/
public static final HttpMethod GET = new HttpMethod(GET_STRING);
/**
* The HEAD method is identical to GET except that the server MUST NOT return a message-body
* in the response.
*/
public static final HttpMethod HEAD = new HttpMethod("HEAD");
/**
* The POST method is used to request that the origin server accept the entity enclosed in the
* request as a new subordinate of the resource identified by the Request-URI in the
* Request-Line.
*/
public static final HttpMethod POST = new HttpMethod(POST_STRING);
/**
* The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
*/
public static final HttpMethod PUT = new HttpMethod("PUT");
/**
* The PATCH method requests that a set of changes described in the
* request entity be applied to the resource identified by the Request-URI.
*/
public static final HttpMethod PATCH = new HttpMethod("PATCH");
/**
* The DELETE method requests that the origin server delete the resource identified by the
* Request-URI.
*/
public static final HttpMethod DELETE = new HttpMethod("DELETE");
/**
* The TRACE method is used to invoke a remote, application-layer loop- back of the request
* message.
*/
public static final HttpMethod TRACE = new HttpMethod("TRACE");
/**
* This specification reserves the method name CONNECT for use with a proxy that can dynamically
* switch to being a tunnel
*/
public static final HttpMethod CONNECT = new HttpMethod("CONNECT");
/**
* Returns the {@link HttpMethod} represented by the specified name.
* If the specified name is a standard HTTP method name, a cached instance
* will be returned. Otherwise, a new instance will be returned.
*/
public static HttpMethod valueOf(String name) {
switch (name) {
case "OPTIONS": return HttpMethod.OPTIONS;
case "GET": return HttpMethod.GET;
case "HEAD": return HttpMethod.HEAD;
case "POST": return HttpMethod.POST;
case "PUT": return HttpMethod.PUT;
case "PATCH": return HttpMethod.PATCH;
case "DELETE": return HttpMethod.DELETE;
case "TRACE": return HttpMethod.TRACE;
case "CONNECT": return HttpMethod.CONNECT;
default: return new HttpMethod(name);
Source
Frequently Asked Questions
What is the HttpMethod class?
HttpMethod is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpMethod.java.
Where is HttpMethod defined?
HttpMethod is defined in codec-http/src/main/java/io/netty/handler/codec/http/HttpMethod.java at line 27.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free