Interface HttpRequest
- All Known Subinterfaces:
JsonRpcRequest, RoutingRequest, ServerRequest
public interface HttpRequest
HTTP Request.
Used for all HTTP versions.
-
Method Summary
Modifier and TypeMethodDescriptionAuthority exposed for this request.voidReplace (or set) a request header.headers()Headers of the request.intid()Request ID on this connection.Peer info of the local side.path()Path of the request, with methods to get path parameters.prologue()Prologue of the request.query()Query of the request.Peer info of the remote peer.URI as requested by the originating client (to the best of our ability to compute it).
-
Method Details
-
prologue
-
headers
-
path
-
query
-
remotePeer
-
localPeer
-
authority
String authority()Authority exposed for this request. An HTTP/1 absolute-form request-target supplies the normalizedHeaderNames.HOSTvalue; other HTTP/1 request forms expose that header as received. HTTP/2 uses the:authoritypseudo-header when present and otherwise usesHost; a conflict is rejected.- Returns:
- authority of this request
-
header
Replace (or set) a request header. This may be useful in filters, or on re-routing.- Parameters:
header- header to set
-
id
int id()Request ID on this connection. In HTTP/1, this is a number between 0 andInteger.MAX_VALUE. When the number of requests reaches maximum, it starts again from 0. In HTTP/2, this is the stream id.- Returns:
- id of this request on a connection
-
requestedUri
UriInfo requestedUri()URI as requested by the originating client (to the best of our ability to compute it). By default, Helidon reconstructs the URI using the effective request authority, request path, and connection scheme. For an HTTP/1 absolute-form request-target, its scheme and authority take precedence over theHostheader. If requested URI discovery is enabled by configuration, headers from trusted proxies (such asHeaderNames.FORWARDED) may override the corresponding URI components.- Returns:
- uri info that can be used for redirects
-