io.vertx.rxjava.ext.web.client

## Class HttpResponse<T>

- java.lang.Object
- - io.vertx.rxjava.ext.web.client.HttpResponse<T>

-     public class HttpResponse<T>
      extends Object

  An HTTP response.

  The usual HTTP response attributes are available:

  - `statusCode()` the HTTP status code
  - `statusMessage()` the HTTP status message
  - `headers()` the HTTP headers
  - `version()` the HTTP version

  The body of the response is returned by `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.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<HttpResponse>` | `__TYPE_ARG`
    `TypeArg<T>` | `__typeArg_0`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpResponse(HttpResponse delegate)`
    `HttpResponse(HttpResponse delegate, TypeArg<T> typeArg_0)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `body()`
    `Buffer` | `bodyAsBuffer()`
    `<R> R` | `bodyAsJson(Class<R> type)`
    `JsonObject` | `bodyAsJsonObject()`
    `String` | `bodyAsString()`
    `String` | `bodyAsString(String encoding)`
    `List<String>` | `cookies()`
    `HttpResponse` | `getDelegate()`
    `String` | `getHeader(String headerName)` Return the first header value with the specified name
    `String` | `getTrailer(String trailerName)` Return the first trailer value with the specified name
    `MultiMap` | `headers()`
    `static <T> HttpResponse` | `newInstance(HttpResponse arg)`
    `static <T> HttpResponse` | `newInstance(HttpResponse arg, TypeArg<T> __typeArg_T)`
    `int` | `statusCode()`
    `String` | `statusMessage()`
    `MultiMap` | `trailers()`
    `HttpVersion` | `version()`

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

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

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<HttpResponse> __TYPE_ARG

    - #### __typeArg_0

          public final TypeArg<T> __typeArg_0

  - ### Constructor Detail

    - #### HttpResponse

          public HttpResponse(HttpResponse delegate)

    - #### HttpResponse

          public HttpResponse(HttpResponse delegate,
                              TypeArg<T> typeArg_0)

  - ### Method Detail

    - #### getDelegate

          public HttpResponse getDelegate()

    - #### version

          public HttpVersion version()

      Returns:
        the version of the response

    - #### statusCode

          public int statusCode()

      Returns:
        the status code of the response

    - #### statusMessage

          public String statusMessage()

      Returns:
        the status message of the response

    - #### headers

          public MultiMap headers()

      Returns:
        the headers

    - #### getHeader

          public String getHeader(String headerName)

      Return the first header value with the specified name
      Parameters:
        `headerName` - the header name
      Returns:
        the header value

    - #### trailers

          public MultiMap trailers()

      Returns:
        the trailers

    - #### getTrailer

          public String getTrailer(String trailerName)

      Return the first trailer value with the specified name
      Parameters:
        `trailerName` - the trailer name
      Returns:
        the trailer value

    - #### cookies

          public List<String> cookies()

      Returns:
        the Set-Cookie headers (including trailers)

    - #### body

          public T body()

      Returns:
        the response body in the format it was decoded.

    - #### bodyAsBuffer

          public Buffer bodyAsBuffer()

      Returns:
        the response body decoded as a

    - #### bodyAsString

          public String bodyAsString()

      Returns:
        the response body decoded as a `String`

    - #### bodyAsString

          public String bodyAsString(String encoding)

      Parameters:
        `encoding` -
      Returns:
        the response body decoded as a `String` given a specific `encoding`

    - #### bodyAsJsonObject

          public JsonObject bodyAsJsonObject()

      Returns:
        the response body decoded as a json object

    - #### bodyAsJson

          public <R> R bodyAsJson(Class<R> type)

      Parameters:
        `type` -
      Returns:
        the response body decoded as the specified `type` with the Jackson mapper.

    - #### newInstance

          public static <T> HttpResponse newInstance(HttpResponse arg)

    - #### newInstance

          public static <T> HttpResponse newInstance(HttpResponse arg,
                                                     TypeArg<T> __typeArg_T)

Copyright © 2017. All rights reserved.