Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpClientResponse

Represents a client-side HTTP response.

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

It implements ReadStream so it can be used with Pipe to pipe data with flow control.

Hierarchy

  • HttpClientResponse

Implements

Index

Methods

body

  • Same as {@link HttpClientResponse#body} but with an handler called when the operation completes

    Returns PromiseLike<Buffer>

  • Same as {@link HttpClientResponse#body} but with an handler called when the operation completes

    Parameters

    Returns HttpClientResponse

bodyHandler

  • 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

    Returns HttpClientResponse

cookies

  • cookies(): string
  • Returns string

customFrameHandler

  • 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

    Returns HttpClientResponse

end

  • Same as {@link HttpClientResponse#end} but with an handler called when the operation completes

    Returns PromiseLike<void>

  • Same as {@link HttpClientResponse#end} but with an handler called when the operation completes

    Parameters

    Returns void

endHandler

  • Parameters

    • endHandler: ((res: void) => void) | Handler<void> | null | undefined

    Returns HttpClientResponse

exceptionHandler

fetch

getHeader

  • getHeader(headerName: string): string | null
  • getHeader(headerName: string): string
  • Return the first header value with the specified name

    Parameters

    • headerName: string

    Returns string | null

  • Return the first header value with the specified name

    Parameters

    • headerName: string

    Returns string

getTrailer

  • getTrailer(trailerName: string): string | null
  • Return the first trailer value with the specified name

    Parameters

    • trailerName: string

    Returns string | null

handler

headers

  • Returns MultiMap

netSocket

  • Returns NetSocket

pause

pipe

  • Pause this stream and return a to transfer the elements of this stream to a destination .

    The stream will be resumed when the pipe will be wired to a WriteStream.

    Returns Pipe<Buffer>

pipeTo

  • Pipe this ReadStream to the WriteStream.

    Elements emitted by this stream will be written to the write stream until this stream ends or fails.

    Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

    Parameters

    Returns PromiseLike<void>

  • Pipe this ReadStream to the WriteStream.

    Elements emitted by this stream will be written to the write stream until this stream ends or fails.

    Once this stream has ended or failed, the write stream will be ended and the handler will be called with the result.

    Parameters

    Returns void

request

  • Returns HttpClientRequest

resume

statusCode

  • statusCode(): number
  • Returns number

statusMessage

  • statusMessage(): string
  • Returns string

streamPriorityHandler

trailers

  • Returns MultiMap

version

  • Returns HttpVersion

Generated using TypeDoc