Package io.helidon.common.http
Interface HttpRequest
-
- All Known Subinterfaces:
ServerRequest
public interface HttpRequestCommon attributes of an HTTP Request, that are used both in server requests and in client requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHttpRequest.PathRepresents requested normalised URI path.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringfragment()Returns a decoded request URI fragment without leading hash '#' character.Http.RequestMethodmethod()Returns an HTTP request method.HttpRequest.Pathpath()Returns a path which was accepted by matcher in actual routing.Stringquery()Returns an encoded query string without leading '?' character.ParametersqueryParams()Returns query parameters.URIuri()Returns a Request-URI (or alternatively path) as defined in request line.Http.Versionversion()Returns an HTTP version from the request line.
-
-
-
Method Detail
-
method
Http.RequestMethod method()
Returns an HTTP request method. See alsoHTTP standard methodsutility class.- Returns:
- an HTTP method
- See Also:
Http.Method
-
version
Http.Version version()
Returns an HTTP version from the request line.See
HTTP Versionenumeration for supported versions.If communication starts as a
HTTP/1.1withh2cupgrade, then it will be automatically upgraded and this method returnsHTTP/2.0.- Returns:
- an HTTP version
-
uri
URI uri()
Returns a Request-URI (or alternatively path) as defined in request line.- Returns:
- a request URI
-
query
String query()
Returns an encoded query string without leading '?' character.- Returns:
- an encoded query string
-
queryParams
Parameters queryParams()
Returns query parameters.- Returns:
- an parameters representing query parameters
-
path
HttpRequest.Path path()
Returns a path which was accepted by matcher in actual routing. It is path without a context root of the routing.Use
HttpRequest.Path.absolute()method to obtain absolute request URI path representation.Returned
HttpRequest.Pathalso provide access to path template parameters. An absolute path then provides access to all (including) context parameters if any. In case of conflict between parameter names, most recent value is returned.- Returns:
- a path
-
fragment
String fragment()
Returns a decoded request URI fragment without leading hash '#' character.- Returns:
- a decoded URI fragment
-
-