# Class: HttpClientResponse

## vertx-js/http_client_response~ HttpClientResponse

#### new HttpClientResponse()

Represents a client-side HTTP response.

Source:
  - vertx-js/http_client_response.js, line 34

### 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:
  - vertx-js/http_client_response.js, line 239

##### Returns:

Type
  HttpClientResponse

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

Source:
  - vertx-js/http_client_response.js, line 219

##### Returns:

the Set-Cookie headers (including trailers)

Type
  Array.<string>

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

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.

##### Parameters:

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

Source:
  - vertx-js/http_client_response.js, line 257

##### Returns:

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

Type
  HttpClientResponse

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

##### Parameters:

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

Source:
  - vertx-js/http_client_response.js, line 106

##### Returns:

Type
  HttpClientResponse

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

##### Parameters:

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

Source:
  - vertx-js/http_client_response.js, line 60

##### 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:
  - vertx-js/http_client_response.js, line 176

##### 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:
  - vertx-js/http_client_response.js, line 190

##### Returns:

the trailer value

Type
  string

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

##### Parameters:

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

Source:
  - vertx-js/http_client_response.js, line 76

##### Returns:

Type
  HttpClientResponse

#### headers() → {MultiMap}

Source:
  - vertx-js/http_client_response.js, line 159

##### 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:
  - vertx-js/http_client_response.js, line 279

##### Returns:

the net socket

Type
  NetSocket

#### pause() → {HttpClientResponse}

Source:
  - vertx-js/http_client_response.js, line 92

##### Returns:

Type
  HttpClientResponse

#### resume() → {HttpClientResponse}

Source:
  - vertx-js/http_client_response.js, line 46

##### Returns:

Type
  HttpClientResponse

#### statusCode() → {number}

Source:
  - vertx-js/http_client_response.js, line 133

##### Returns:

the status code of the response

Type
  number

#### statusMessage() → {string}

Source:
  - vertx-js/http_client_response.js, line 146

##### Returns:

the status message of the response

Type
  string

#### trailers() → {MultiMap}

Source:
  - vertx-js/http_client_response.js, line 203

##### Returns:

the trailers

Type
  MultiMap

#### version() → {Object}

Source:
  - vertx-js/http_client_response.js, line 120

##### Returns:

the version of the response

Type
  Object