Package org.apache.juneau.http.request
Class HttpRequestLineBean
java.lang.Object
org.apache.juneau.http.request.HttpRequestLineBean
- All Implemented Interfaces:
HttpRequestLine
Default immutable implementation of
HttpRequestLine.
Create instances via the static factory methods:
See Also:
- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the request method (e.g.Returns the HTTP protocol version (e.g.getUri()Returns the request URI (e.g.inthashCode()static HttpRequestLineBeanCreates anHTTP/1.1request line with the given method and URI.static HttpRequestLineBeanCreates a request line with the given method, URI, and parsed protocol version.static HttpRequestLineBeanof(String method, String uri, HttpProtocolVersion protocolVersion) Creates a request line with the given method, URI, and typed protocol version.toString()
-
Method Details
-
of
Creates anHTTP/1.1request line with the given method and URI.- Parameters:
method- The request method (e.g."GET"). Must not benull .uri- The request URI. Must not benull .- Returns:
- A new instance. Never
null .
-
of
public static HttpRequestLineBean of(String method, String uri, HttpProtocolVersion protocolVersion) Creates a request line with the given method, URI, and typed protocol version.- Parameters:
method- The request method. Must not benull .uri- The request URI. Must not benull .protocolVersion- The protocol version. Must not benull .- Returns:
- A new instance. Never
null .
-
of
Creates a request line with the given method, URI, and parsed protocol version.- Parameters:
method- The request method. Must not benull .uri- The request URI. Must not benull .protocolVersion- The protocol version string (e.g."HTTP/2"). Must not benull .- Returns:
- A new instance. Never
null .
-
getMethod
Description copied from interface:HttpRequestLineReturns the request method (e.g."GET","POST").- Specified by:
getMethodin interfaceHttpRequestLine- Returns:
- The method name. Never
null .
-
getUri
Description copied from interface:HttpRequestLineReturns the request URI (e.g."/users/123?verbose=true").- Specified by:
getUriin interfaceHttpRequestLine- Returns:
- The URI. Never
null .
-
getProtocolVersion
Description copied from interface:HttpRequestLineReturns the HTTP protocol version (e.g.HttpProtocolVersion.HTTP_1_1).- Specified by:
getProtocolVersionin interfaceHttpRequestLine- Returns:
- The protocol version. Never
null .
-
toString
-
equals
-
hashCode
-