# Class: HttpClientResponse

## vertx-js/http_client_response~ HttpClientResponse

#### new HttpClientResponse()

  Represents a client-side HTTP response.

  Source:
    - http_client_response.js, line 33

### Methods

#### bodyHandler(bodyHandler) → {HttpClientResponse}

  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.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bodyHandler` | function | This handler will be called after all the body has been received

  Source:
    - http_client_response.js, line 230

  ##### Returns:

  Type
    HttpClientResponse

#### cookies() → {Array.<string>}

  Source:
    - http_client_response.js, line 210

  ##### Returns:

  - the Set-Cookie headers (including trailers)
  - Type
      Array.<string>

#### endHandler(endHandler) → {HttpClientResponse}

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `endHandler` | function |

  Source:
    - http_client_response.js, line 105

  ##### Returns:

  Type
    HttpClientResponse

#### exceptionHandler(handler) → {HttpClientResponse}

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `handler` | function |

  Source:
    - http_client_response.js, line 59

  ##### Returns:

  Type
    HttpClientResponse

#### getHeader(headerName) → {string}

  Return the first header value with the specified name

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `headerName` | string | the header name

  Source:
    - http_client_response.js, line 165

  ##### Returns:

  the header value
  Type
    string

#### getTrailer(trailerName) → {string}

  Return the first trailer value with the specified name

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `trailerName` | string | the trailer name

  Source:
    - http_client_response.js, line 179

  ##### Returns:

  the trailer value
  Type
    string

#### handler(handler) → {HttpClientResponse}

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `handler` | function |

  Source:
    - http_client_response.js, line 75

  ##### Returns:

  Type
    HttpClientResponse

#### headers() → {MultiMap}

  Source:
    - http_client_response.js, line 148

  ##### Returns:

  - the headers
  - Type
      MultiMap

#### netSocket() → {NetSocket}

  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

  One valid use-case for calling this is to receive the NetSocket after a HTTP CONNECT was issued to the remote peer and it responded with a status code of 200.

  Source:
    - http_client_response.js, line 252

  ##### Returns:

  the net socket
  Type
    NetSocket

#### pause() → {HttpClientResponse}

  Source:
    - http_client_response.js, line 91

  ##### Returns:

  Type
    HttpClientResponse

#### resume() → {HttpClientResponse}

  Source:
    - http_client_response.js, line 45

  ##### Returns:

  Type
    HttpClientResponse

#### statusCode() → {number}

  Source:
    - http_client_response.js, line 120

  ##### Returns:

  - the status code of the response
  - Type
      number

#### statusMessage() → {string}

  Source:
    - http_client_response.js, line 134

  ##### Returns:

  - the status message of the response
  - Type
      string

#### trailers() → {MultiMap}

  Source:
    - http_client_response.js, line 193

  ##### Returns:

  - the trailers
  - Type
      MultiMap