vertx-lang-scala-docs_2.12 3.4.1 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package client
  Definition Classes
    web
- HttpRequest
- HttpResponse
- WebClient
- WebClientOptions

c

io.vertx.scala.ext.web.client

# HttpResponse 

###
Companion object HttpResponse

#### class HttpResponse[T] extends AnyRef

An HTTP response.

The usual HTTP response attributes are available:

- io.vertx.scala.ext.web.client.HttpResponse#statusCode the HTTP status code
- io.vertx.scala.ext.web.client.HttpResponse#statusMessage the HTTP status message
- io.vertx.scala.ext.web.client.HttpResponse#headers the HTTP headers
- io.vertx.scala.ext.web.client.HttpResponse#version the HTTP version

The body of the response is returned by io.vertx.scala.ext.web.client.HttpResponse#body decoded as the format specified by the that built the response.

Keep in mind that using this `HttpResponse` impose to fully buffer the response body and should be used for payload that can fit in memory.

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. HttpResponse
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new HttpResponse(_asJava: AnyRef)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T])

### 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
6.  def body(): T

   returns

     the response body in the format it was decoded.

7.  def bodyAsBuffer(): Option[Buffer]

   returns

     the response body decoded as a Buffer

8.  def bodyAsJson[R](type: Class[R])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[R]): R

   returns

     the response body decoded as the specified `type` with the Jackson mapper.

9.  def bodyAsJsonArray(): Option[JsonArray]

   returns

     the response body decoded as a json array

10.  def bodyAsJsonObject(): Option[JsonObject]

    returns

      the response body decoded as a json object

11.  def bodyAsString(encoding: String): Option[String]

    returns

      the response body decoded as a `String` given a specific `encoding`

12.  def bodyAsString(): Option[String]

    returns

      the response body decoded as a `String`

13.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
14.  def cookies(): Buffer[String]

    returns

      the Set-Cookie headers (including trailers)

15.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
16.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
17.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
18.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
19.  def getHeader(headerName: String): Option[String]

    Return the first header value with the specified name

    Return the first header value with the specified name

    headerName

      the header name

    returns

      the header value

20.  def getTrailer(trailerName: String): Option[String]

    Return the first trailer value with the specified name

    Return the first trailer value with the specified name

    trailerName

      the trailer name

    returns

      the trailer value

21.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
22.  def headers(): MultiMap

    returns

      the headers

23.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
24.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
25.  final def notify(): Unit
    Definition Classes
      AnyRef
26.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
27.  def statusCode(): Int

    returns

      the status code of the response

28.  def statusMessage(): String

    returns

      the status message of the response

29.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
30.  def toString(): String
    Definition Classes
      AnyRef → Any
31.  def trailers(): MultiMap

    returns

      the trailers

32.  def version(): HttpVersion

    returns

      the version of the response

33.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
34.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
35.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped