org.vertx.java.core.http

## Class HttpServerRequest

- java.lang.Object
- - org.vertx.java.core.http.impl.HttpReadStreamBase
  - - org.vertx.java.core.http.HttpServerRequest

All Implemented Interfaces:
  ReadStream

    public abstract class HttpServerRequest
    extends org.vertx.java.core.http.impl.HttpReadStreamBase

Represents a server-side HTTP request.

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

### Field Summary

Fields
`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.

### Constructor Summary

Constructors
`protected` `HttpServerRequest(java.lang.String method, java.lang.String uri, java.lang.String path, java.lang.String query, HttpServerResponse response)`

### Method Summary

Methods
`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

### Methods inherited from class org.vertx.java.core.http.impl.HttpReadStreamBase

`bodyHandler`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.vertx.java.core.streams.ReadStream

`dataHandler, endHandler, exceptionHandler, pause, resume`

### Field Detail

#### method

    public final java.lang.String method

The HTTP method for the request. One of GET, PUT, POST, DELETE, TRACE, CONNECT, OPTIONS or HEAD

#### uri

    public final java.lang.String uri

The uri of the request. For example http://www.somedomain.com/somepath/somemorepath/somresource.foo?someparam=32&someotherparam=x

#### path

    public final java.lang.String path

The path part of the uri. For example /somepath/somemorepath/somresource.foo

#### query

    public final java.lang.String query

The query part of the uri. For example someparam=32&someotherparam=x

#### response

    public final HttpServerResponse response

The response. Each instance of this class has an `HttpServerResponse` instance attached to it. This is used to send the response back to the client.

### Constructor Detail

#### HttpServerRequest

    protected HttpServerRequest(java.lang.String method,
                     java.lang.String uri,
                     java.lang.String path,
                     java.lang.String query,
                     HttpServerResponse response)

### Method Detail

#### headers

    public 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. The headers will be automatically lower-cased when they reach the server

#### params

    public abstract java.util.Map<java.lang.String,java.lang.String> params()

Returns a map of all the parameters in the request