open class HttpServerRequest : ReadStream<Buffer>
Represents a server-side HTTP request.
Instances are created for each request and passed to the user via a handler.
Each instance of this class is associated with a corresponding io.vertx.reactivex.core.http.HttpServerResponse instance via io.vertx.reactivex.core.http.HttpServerRequest#response.
It implements io.vertx.reactivex.core.streams.ReadStream so it can be used with io.vertx.reactivex.core.streams.Pump to pump data with flow control.
NOTE: This class has been automatically generated from the io.vertx.core.http.HttpServerRequest non RX-ified interface using Vert.x codegen.
HttpServerRequest(delegate: HttpServerRequest) |
static val __TYPE_ARG: TypeArg<HttpServerRequest> |
open fun absoluteURI(): String |
|
open fun bodyHandler(bodyHandler: Handler<Buffer>): HttpServerRequest
Convenience method for receiving the entire request body in one piece. This saves the user having to manually setting a data and end handler and append the chunks of the body until the whole body received. Don't use this if your request body is large - you could potentially run out of RAM. |
|
open fun connection(): HttpConnection |
|
open fun customFrameHandler(handler: Handler<HttpFrame>): HttpServerRequest
Set a custom frame handler. The handler will get notified when the http stream receives an custom HTTP/2 frame. HTTP/2 permits extension of the protocol. |
|
open fun endHandler(endHandler: Handler<Void>): HttpServerRequest |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): HttpServerRequest |
|
open fun formAttributes(): MultiMap
Returns a map of all form attributes in the request. Be aware that the attributes will only be available after the whole body has been received, i.e. after the request end handler has been called. |
|
open fun getDelegate(): HttpServerRequest |
|
open fun getFormAttribute(attributeName: String): String
Return the first form attribute value with the specified name |
|
open fun getHeader(headerName: String): String
Return the first header value with the specified name |
|
open fun getParam(paramName: String): String
Return the first param value with the specified name |
|
open fun handler(handler: Handler<Buffer>): HttpServerRequest |
|
open fun hashCode(): Int |
|
open fun headers(): MultiMap |
|
open fun host(): String |
|
open fun isEnded(): Boolean
Has the request ended? I.e. has the entire request, including the body been read? |
|
open fun isExpectMultipart(): Boolean |
|
open fun isSSL(): Boolean |
|
open fun localAddress(): SocketAddress |
|
open fun method(): HttpMethod |
|
open fun netSocket(): NetSocket
Get a net socket for the underlying connection of this request. USE THIS WITH CAUTION! Once you have called this method, you must handle writing to the connection yourself using the net socket, the server request instance will no longer be usable as normal. Writing to the socket directly if you don't know what you're doing can easily break the HTTP protocol. |
|
open static fun newInstance(arg: HttpServerRequest): HttpServerRequest |
|
open fun params(): MultiMap |
|
open fun path(): String |
|
open fun pause(): HttpServerRequest |
|
open fun query(): String |
|
open fun rawMethod(): String |
|
open fun remoteAddress(): SocketAddress |
|
open fun response(): HttpServerResponse |
|
open fun resume(): HttpServerRequest |
|
open fun scheme(): String |
|
open fun setExpectMultipart(expect: Boolean): HttpServerRequest
Call this with true if you are expecting a multi-part body to be submitted in the request. This must be called before the body of the request has been received |
|
open fun toFlowable(): Flowable<Buffer> |
|
open fun toObservable(): Observable<Buffer> |
|
open fun toString(): String |
|
open fun upgrade(): ServerWebSocket
Upgrade the connection to a WebSocket connection. This is an alternative way of handling WebSockets and can only be used if no websocket handlers are set on the Http server, and can only be used during the upgrade request during the WebSocket handshake. |
|
open fun uploadHandler(uploadHandler: Handler<HttpServerFileUpload>): HttpServerRequest
Set an upload handler. The handler will get notified once a new file upload was received to allow you to deal with the file upload. |
|
open fun uri(): String |
|
open fun version(): HttpVersion |