Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RequestOptions

Options describing how an HttpClient will connect to make a request.

Hierarchy

Index

Constructors

constructor

  • Returns RequestOptions

  • Parameters

    Returns RequestOptions

Methods

getFollowRedirects

  • getFollowRedirects(): boolean
  • Set whether to follow HTTP redirect

    Returns boolean

getHost

  • getHost(): string
  • Set the host name to be used by the client request.

    Returns string

getPort

  • getPort(): number
  • Set the port to be used by the client request.

    Returns number

getProxyOptions

  • Override the HttpClientOptions proxy options for connections.

    Returns ProxyOptions

getServer

  • Set the server address to be used by the client request.

    When the server address is null, the address will be resolved after the host property by the Vert.x resolver.

    Use this when you want to connect to a specific server address without name resolution.

    Returns SocketAddress

getTimeout

  • getTimeout(): number
  • Sets the amount of time after which if the request does not return any data within the timeout period an TimeoutException will be passed to the exception handler and the request will be closed.

    Returns number

getTraceOperation

  • getTraceOperation(): string
  • Override the operation the tracer use for this request. When no operation is set, the HTTP method is used instead.

    Returns string

getURI

  • getURI(): string
  • Set the request relative URI.

    Returns string

isSsl

  • isSsl(): boolean
  • Set whether SSL/TLS is enabled.

    Returns boolean

setAbsoluteURI

  • Parse an absolute URI to use, this will update the ssl, host, port and uri fields.

    Parameters

    • absoluteURI: string

    Returns RequestOptions

setFollowRedirects

  • Set whether to follow HTTP redirect

    Parameters

    • followRedirects: boolean

    Returns RequestOptions

setHost

  • Set the host name to be used by the client request.

    Parameters

    • host: string

    Returns RequestOptions

setPort

  • Set the port to be used by the client request.

    Parameters

    • port: number

    Returns RequestOptions

setProxyOptions

setServer

  • Set the server address to be used by the client request.

    When the server address is null, the address will be resolved after the host property by the Vert.x resolver.

    Use this when you want to connect to a specific server address without name resolution.

    Parameters

    Returns RequestOptions

setSsl

  • Set whether SSL/TLS is enabled.

    Parameters

    • ssl: boolean

    Returns RequestOptions

setTimeout

  • Sets the amount of time after which if the request does not return any data within the timeout period an TimeoutException will be passed to the exception handler and the request will be closed.

    Parameters

    • timeout: number

    Returns RequestOptions

setTraceOperation

  • Override the operation the tracer use for this request. When no operation is set, the HTTP method is used instead.

    Parameters

    • traceOperation: string

    Returns RequestOptions

setURI

  • Set the request relative URI.

    Parameters

    • uri: string

    Returns RequestOptions

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc