Interface HttpRequest
- All Known Subinterfaces:
JsonRpcRequest, RoutingRequest, ServerRequest
public interface HttpRequest
HTTP Request.
Used for all HTTP versions.
-
Method Summary
Modifier and TypeMethodDescriptionThe content of theHeaderNames.HOSTheader orauthoritypseudo header (HTTP/2).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()The content of theHeaderNames.HOSTheader orauthoritypseudo header (HTTP/2).- 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, the URI is from theHeaderNames.HOSTheader on the current request. If requested URI discovery is enabled by configuration, additional headers (such asHeaderNames.FORWARDED) may be used to derive the originally-requested URI.- Returns:
- uri info that can be used for redirects
-