org.vertx.scala.core.http

HttpServerRequest

final class HttpServerRequest extends Self with ReadStream

Represents a server-side HTTP request.

Instances are created for each request that is handled by the server and is passed to the user via the org.vertx.java.core.Handler instance registered with the org.vertx.scala.core.http.HttpServer using the method org.vertx.scala.core.http.HttpServer.requestHandler(org.vertx.java.core.Handler).

Each instance of this class is associated with a corresponding org.vertx.scala.core.http.HttpServerResponse instance via the response field.

It implements org.vertx.scala.core.streams.ReadStream so it can be used with org.vertx.scala.core.streams.Pump to pump data with flow control.

Instances of this class are not thread-safe

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpServerRequest
  2. ReadStream
  3. ReadSupport
  4. ExceptionSupport
  5. AsJava
  6. Self
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type J = java.core.http.HttpServerRequest

    The internal type of the Java wrapped class.

    The internal type of the Java wrapped class.

    Definition Classes
    HttpServerRequestReadStreamReadSupportExceptionSupport → AsJava

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def absoluteURI(): URI

    Get the absolute URI corresponding to the the HTTP request

    Get the absolute URI corresponding to the the HTTP request

    returns

    the URI

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val asJava: java.core.http.HttpServerRequest

    The internal instance of the Java wrapped class.

    The internal instance of the Java wrapped class.

    Definition Classes
    HttpServerRequest → AsJava
  9. def bodyHandler(handler: (Buffer) ⇒ Unit): HttpServerRequest

    Convenience method for receiving the entire request body in one piece.

    Convenience method for receiving the entire request body in one piece. This saves the user having to manually set 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.

    handler

    This handler will be called after all the body has been received

  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def dataHandler(handler: (Buffer) ⇒ Unit): HttpServerRequest.this.type

    Set a data handler.

    Set a data handler. As data is read, the handler will be called with the data.

    Definition Classes
    ReadStreamReadSupport
  12. def endHandler(handler: ⇒ Unit): HttpServerRequest.this.type

    Set an end handler.

    Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.

    Definition Classes
    ReadStream
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def exceptionHandler(handler: (Throwable) ⇒ Unit): HttpServerRequest.this.type

    Set an exception handler.

    Set an exception handler.

    Definition Classes
    ExceptionSupport
  16. def expectMultiPart(expect: Boolean): HttpServerRequest

    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.

    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.

    expect

    true if expecting multi-part form, false otherwise

  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def formAttributes(): MultiMap

    Returns a map of all form attributes which was found in the request.

    Returns a map of all form attributes which was found in the request. Be aware that this message should only get called after the endHandler was notified as the map will be filled on-the-fly. org.vertx.scala.core.http.HttpServerRequest.expectMultiPart(boolean) must be called first before trying to get the formAttributes

  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def headers(): MultiMap

    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.

    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

    This method converts a Java collection into a Scala collection every time it gets called, so use it sensibly.

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def localAddress(): InetSocketAddress

    Return the local (server side) address of the server that handles the request

  24. def method(): String

    The HTTP method for the request.

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

  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def netSocket(): NetSocket

    Get a net socket for the underlying connection of this request.

    Get a net socket for the underlying connection of this request. USE THIS WITH CAUTION! Writing to the socket directly if you don't know what you're doing can easily break the HTTP protocol

    returns

    the net socket

  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def params(): MultiMap

    Returns a map of all the parameters in the request.

    Returns a map of all the parameters in the request.

    This method converts a Java collection into a Scala collection every time it gets called, so use it sensibly.

    returns

    A map of all the parameters in the request.

  30. def path(): String

    The path part of the uri.

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

  31. def pause(): HttpServerRequest.this.type

    Pause the ReadSupport.

    Pause the ReadSupport. While it's paused, no data will be sent to the dataHandler

    Definition Classes
    ReadSupport
  32. def peerCertificateChain(): Array[X509Certificate]

    returns

    an array of the peer certificates. Returns null if connection is not SSL.

    Exceptions thrown
    SSLPeerUnverifiedException

    SSL peer's identity has not been verified.

  33. def query(): String

    The query part of the uri.

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

  34. def remoteAddress(): InetSocketAddress

    Return the remote (client side) address of the request.

  35. def response(): HttpServerResponse

    The response.

    The response. Each instance of this class has an org.vertx.scala.core.http.HttpServerResponse instance attached to it. This is used to send the response back to the client.

  36. def resume(): HttpServerRequest.this.type

    Resume reading.

    Resume reading. If the ReadSupport has been paused, reading will recommence on it.

    Definition Classes
    ReadSupport
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. def toString(): String

    Definition Classes
    AnyRef → Any
  39. def uploadHandler(handler: (HttpServerFileUpload) ⇒ Unit): HttpServerRequest

    Set the upload handler.

    Set the upload handler. The handler will get notified once a new file upload was received and so allow to get notified by the upload in progress.

  40. def uri(): String

    The uri of the request.

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

  41. def version(): HttpVersion

    The HTTP version of the request

  42. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def wrap[X](doStuff: ⇒ X): HttpServerRequest.this.type

    Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types

    Helper method wrapping invocations and returning the Scala type, once again to help provide fluent return types

    Attributes
    protected[this]
    Definition Classes
    Self

Inherited from ReadStream

Inherited from ReadSupport[Buffer]

Inherited from ExceptionSupport

Inherited from AsJava

Inherited from Self

Inherited from AnyRef

Inherited from Any

Ungrouped