public class DefaultHttpServerRequest extends java.lang.Object implements HttpServerRequest
| Modifier and Type | Method and Description |
|---|---|
java.net.URI |
absoluteURI()
Get the absolute URI corresponding to the the HTTP request
|
HttpServerRequest |
bodyHandler(Handler<Buffer> bodyHandler)
Convenience method for receiving the entire request body in one piece.
|
HttpServerRequest |
dataHandler(Handler<Buffer> dataHandler)
Set a data handler.
|
HttpServerRequest |
endHandler(Handler<java.lang.Void> handler)
Set an end handler.
|
HttpServerRequest |
exceptionHandler(Handler<java.lang.Throwable> handler)
Set an exception handler.
|
HttpServerRequest |
expectMultiPart(boolean expect)
Call this with true if you are expecting a multi-part form to be submitted in the request
This must be called before the body of the request has been received
|
MultiMap |
formAttributes()
Returns a map of all form attributes which was found in the request.
|
MultiMap |
headers()
A map of all headers in the request, If the request contains multiple headers with the same key, the values
will be concatenated together into a single header with the same key value, with each value separated by a comma,
as specified here.
|
java.lang.String |
method()
The HTTP method for the request.
|
NetSocket |
netSocket()
Get a net socket for the underlying connection of this request.
|
MultiMap |
params()
Returns a map of all the parameters in the request
|
java.lang.String |
path()
The path part of the uri.
|
HttpServerRequest |
pause()
Pause the
ReadStream. |
javax.security.cert.X509Certificate[] |
peerCertificateChain() |
java.lang.String |
query()
The query part of the uri.
|
java.net.InetSocketAddress |
remoteAddress()
Return the remote (client side) address of the request
|
HttpServerResponse |
response()
The response.
|
HttpServerRequest |
resume()
Resume reading.
|
HttpServerRequest |
uploadHandler(Handler<HttpServerFileUpload> handler)
Set the upload handler.
|
java.lang.String |
uri()
The uri of the request.
|
HttpVersion |
version()
The HTTP version of the request
|
public HttpVersion version()
HttpServerRequestversion in interface HttpServerRequestpublic java.lang.String method()
HttpServerRequestmethod in interface HttpServerRequestpublic java.lang.String uri()
HttpServerRequesturi in interface HttpServerRequestpublic java.lang.String path()
HttpServerRequestpath in interface HttpServerRequestpublic java.lang.String query()
HttpServerRequestquery in interface HttpServerRequestpublic HttpServerResponse response()
HttpServerRequestHttpServerResponse instance attached to it. This is used
to send the response back to the client.response in interface HttpServerRequestpublic MultiMap headers()
HttpServerRequestheaders in interface HttpServerRequestpublic MultiMap params()
HttpServerRequestparams in interface HttpServerRequestpublic HttpServerRequest dataHandler(Handler<Buffer> dataHandler)
ReadStreamdataHandler in interface ReadStream<HttpServerRequest>public HttpServerRequest exceptionHandler(Handler<java.lang.Throwable> handler)
ExceptionSupportexceptionHandler in interface ExceptionSupport<HttpServerRequest>public HttpServerRequest pause()
ReadStreamReadStream. While the stream is paused, no data will be sent to the dataHandlerpause in interface ReadStream<HttpServerRequest>public HttpServerRequest resume()
ReadStreamReadStream has been paused, reading will recommence on it.resume in interface ReadStream<HttpServerRequest>public HttpServerRequest endHandler(Handler<java.lang.Void> handler)
ReadStreamendHandler in interface ReadStream<HttpServerRequest>public java.net.InetSocketAddress remoteAddress()
HttpServerRequestremoteAddress in interface HttpServerRequestpublic java.net.URI absoluteURI()
HttpServerRequestabsoluteURI in interface HttpServerRequestpublic javax.security.cert.X509Certificate[] peerCertificateChain()
throws javax.net.ssl.SSLPeerUnverifiedException
peerCertificateChain in interface HttpServerRequestjavax.net.ssl.SSLPeerUnverifiedException - SSL peer's identity has not been verified.public HttpServerRequest bodyHandler(Handler<Buffer> bodyHandler)
HttpServerRequestbodyHandler in interface HttpServerRequestbodyHandler - This handler will be called after all the body has been receivedpublic NetSocket netSocket()
HttpServerRequestnetSocket in interface HttpServerRequestpublic HttpServerRequest uploadHandler(Handler<HttpServerFileUpload> handler)
HttpServerRequestuploadHandler in interface HttpServerRequestpublic MultiMap formAttributes()
HttpServerRequestHttpServerRequest.expectMultiPart(boolean) must be called first before trying to get the formAttributesformAttributes in interface HttpServerRequestpublic HttpServerRequest expectMultiPart(boolean expect)
HttpServerRequestexpectMultiPart in interface HttpServerRequest