class HttpClientResponse extends ReadStream[Buffer]

Represents a client-side HTTP response.

Vert.x provides you with one of these via the handler that was provided when creating the io.vertx.scala.core.http.HttpClientRequest or that was set on the io.vertx.scala.core.http.HttpClientRequest instance.

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

Linear Supertypes
ReadStream[Buffer], StreamBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpClientResponse
  2. ReadStream
  3. StreamBase
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpClientResponse(_asJava: AnyRef)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJava: AnyRef
    Definition Classes
    HttpClientResponseReadStreamStreamBase
  6. def bodyHandler(bodyHandler: Handler[Buffer]): HttpClientResponse

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

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

    This saves you having to manually set a dataHandler and an endHandler 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. * @param bodyHandler This handler will be called after all the body has been received

  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def cookies(): Buffer[String]

    returns

    the Set-Cookie headers (including trailers)

  9. def customFrameHandler(handler: Handler[HttpFrame]): HttpClientResponse

    Set an custom frame handler.

    Set an 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. * @return a reference to this, so the API can be used fluently

  10. def endHandler(endHandler: Handler[Unit]): HttpClientResponse

    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. * @return a reference to this, so the API can be used fluently

    Definition Classes
    HttpClientResponseReadStream
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def exceptionHandler(handler: Handler[Throwable]): HttpClientResponse

    Set an exception handler on the read stream.

    Set an exception handler on the read stream. * @param handler the exception handler

    returns

    a reference to this, so the API can be used fluently

    Definition Classes
    HttpClientResponseReadStreamStreamBase
  14. def fetch(amount: Long): HttpClientResponse

    Fetch the specified amount of elements.

    Fetch the specified amount of elements. If the ReadStream has been paused, reading will recommence with the specified amount of items, otherwise the specified amount will be added to the current stream demand. * @return a reference to this, so the API can be used fluently

    Definition Classes
    HttpClientResponseReadStream
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def getHeader(headerName: String): Option[String]

    Return the first header value with the specified name * @param headerName the header name

    Return the first header value with the specified name * @param headerName the header name

    returns

    the header value

  18. def getTrailer(trailerName: String): Option[String]

    Return the first trailer value with the specified name * @param trailerName the trailer name

    Return the first trailer value with the specified name * @param trailerName the trailer name

    returns

    the trailer value

  19. def handler(handler: Handler[Buffer]): HttpClientResponse

    Set a data handler.

    Set a data handler. As data is read, the handler will be called with the data. * @return a reference to this, so the API can be used fluently

    Definition Classes
    HttpClientResponseReadStream
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def headers(): MultiMap

    returns

    the headers

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. 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.

    HTTP/1.1 pipe-lined requests cannot support net socket upgrade.

    One valid use-case for calling this is to receive the io.vertx.scala.core.net.NetSocket after a HTTP CONNECT was issued to the remote peer and it responded with a status code of 200. * @return the net socket

  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. def pause(): HttpClientResponse

    Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

    Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

    While it's paused, no data will be sent to the data handler. * @return a reference to this, so the API can be used fluently

    Definition Classes
    HttpClientResponseReadStream
  28. def request(): HttpClientRequest

    returns

    the corresponding request

  29. def resume(): HttpClientResponse

    Resume reading, and sets the buffer in flowing mode.

    Resume reading, and sets the buffer in flowing mode.

    If the ReadStream has been paused, reading will recommence on it. * @return a reference to this, so the API can be used fluently

    Definition Classes
    HttpClientResponseReadStream
  30. def statusCode(): Int

    returns

    the status code of the response

  31. def statusMessage(): String

    returns

    the status message of the response

  32. def streamPriorityHandler(handler: Handler[StreamPriority]): HttpClientResponse

    Set an handler for stream priority changes.

    Set an handler for stream priority changes.

    This is not implemented for HTTP/1.x. * @param handler the handler to be called when the stream priority changes

  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. def trailers(): MultiMap

    returns

    the trailers

  36. def version(): HttpVersion

    returns

    the version of the response

  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from ReadStream[Buffer]

Inherited from StreamBase

Inherited from AnyRef

Inherited from Any

Ungrouped