public abstract class HttpServerRequest
extends org.vertx.java.core.http.impl.HttpReadStreamBase
An instance of this class is created for each request that is handled by the server
and is passed to the user via the Handler
instance
registered with the HttpServer
using the method HttpServer.requestHandler(org.vertx.java.core.Handler)
.
Each instance of this class is associated with a corresponding HttpServerResponse
instance via
the response
field.
It implements ReadStream
so it can be used with
Pump
to pump data with flow control.
Instances of this class are not thread-safe
Modifier and Type | Field and Description |
---|---|
java.lang.String |
method
The HTTP method for the request.
|
java.lang.String |
path
The path part of the uri.
|
java.lang.String |
query
The query part of the uri.
|
HttpServerResponse |
response
The response.
|
java.lang.String |
uri
The uri of the request.
|
Modifier | Constructor and Description |
---|---|
protected |
HttpServerRequest(java.lang.String method,
java.lang.String uri,
java.lang.String path,
java.lang.String query,
HttpServerResponse response) |
Modifier and Type | Method and Description |
---|---|
abstract java.util.Map<java.lang.String,java.lang.String> |
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.
|
abstract java.util.Map<java.lang.String,java.lang.String> |
params()
Returns a map of all the parameters in the request
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dataHandler, endHandler, exceptionHandler, pause, resume
public final java.lang.String method
public final java.lang.String uri
public final java.lang.String path
public final java.lang.String query
public final HttpServerResponse response
HttpServerResponse
instance attached to it. This is used
to send the response back to the client.protected HttpServerRequest(java.lang.String method, java.lang.String uri, java.lang.String path, java.lang.String query, HttpServerResponse response)
public abstract java.util.Map<java.lang.String,java.lang.String> headers()
public abstract java.util.Map<java.lang.String,java.lang.String> params()