Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpEndpoint

for HTTP endpoint (REST api). Consumers receive a HTTP client configured with the host and port of the endpoint.

Hierarchy

  • HttpEndpoint

Index

Properties

Static Readonly TYPE

TYPE: string

Static Readonly UNKNOWN

UNKNOWN: string

Unknown type.

Methods

Static createRecord

  • createRecord(name: string, host: string, port: number, root: string, metadata: {}): Record
  • createRecord(name: string, ssl: boolean, host: string, port: number, root: string, metadata: {}): Record
  • createRecord(name: string, host: string, port: number, root: string): Record
  • createRecord(name: string, host: string): Record
  • Convenient method to create a record for a HTTP endpoint.

    Parameters

    • name: string
    • host: string
    • port: number
    • root: string
    • metadata: {}
      • [key: string]: any

    Returns Record

  • Same as {@link HttpEndpoint#createRecord} but let you configure whether or not the service is using https.

    Parameters

    • name: string
    • ssl: boolean
    • host: string
    • port: number
    • root: string
    • metadata: {}
      • [key: string]: any

    Returns Record

  • Same as {@link HttpEndpoint#createRecord} but without metadata.

    Parameters

    • name: string
    • host: string
    • port: number
    • root: string

    Returns Record

  • Same as {@link HttpEndpoint#createRecord} but without metadata, using the port 80 and using "/" as root.

    Parameters

    • name: string
    • host: string

    Returns Record

Static getClient

  • getClient(discovery: ServiceDiscovery, filter: {}): PromiseLike<HttpClient>
  • getClient(discovery: ServiceDiscovery, filter: {}, resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>): void
  • getClient(discovery: ServiceDiscovery, filter: {}, conf: {}): PromiseLike<HttpClient>
  • getClient(discovery: ServiceDiscovery, filter: {}, conf: {}, resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>): void
  • getClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean): PromiseLike<HttpClient>
  • getClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean, resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>): void
  • getClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean, conf: {}): PromiseLike<HttpClient>
  • getClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean, conf: {}, resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>): void
  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    Returns PromiseLike<HttpClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    • discovery: ServiceDiscovery
    • filter: {}
      • [key: string]: any
    • resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>

    Returns void

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client

    Parameters

    • discovery: ServiceDiscovery
    • filter: {}
      • [key: string]: any
    • conf: {}
      • [key: string]: any

    Returns PromiseLike<HttpClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client

    Parameters

    • discovery: ServiceDiscovery
    • filter: {}
      • [key: string]: any
    • conf: {}
      • [key: string]: any
    • resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>

    Returns void

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    Returns PromiseLike<HttpClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    • discovery: ServiceDiscovery
    • filter: (arg: Record) => boolean
        • Parameters

          Returns boolean

    • resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>

    Returns void

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.

    Parameters

    Returns PromiseLike<HttpClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.

    Parameters

    • discovery: ServiceDiscovery
    • filter: (arg: Record) => boolean
        • Parameters

          Returns boolean

    • conf: {}
      • [key: string]: any
    • resultHandler: ((res: AsyncResult<HttpClient>) => void) | Handler<AsyncResult<HttpClient>>

    Returns void

Static getWebClient

  • getWebClient(discovery: ServiceDiscovery, filter: {}): PromiseLike<WebClient>
  • getWebClient(discovery: ServiceDiscovery, filter: {}, resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>): void
  • getWebClient(discovery: ServiceDiscovery, filter: {}, conf: {}): PromiseLike<WebClient>
  • getWebClient(discovery: ServiceDiscovery, filter: {}, conf: {}, resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>): void
  • getWebClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean): PromiseLike<WebClient>
  • getWebClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean, resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>): void
  • getWebClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean, conf: {}): PromiseLike<WebClient>
  • getWebClient(discovery: ServiceDiscovery, filter: (arg: Record) => boolean, conf: {}, resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>): void
  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    Returns PromiseLike<WebClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    • discovery: ServiceDiscovery
    • filter: {}
      • [key: string]: any
    • resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>

    Returns void

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client

    Parameters

    • discovery: ServiceDiscovery
    • filter: {}
      • [key: string]: any
    • conf: {}
      • [key: string]: any

    Returns PromiseLike<WebClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client

    Parameters

    • discovery: ServiceDiscovery
    • filter: {}
      • [key: string]: any
    • conf: {}
      • [key: string]: any
    • resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>

    Returns void

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    Returns PromiseLike<WebClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails.

    Parameters

    • discovery: ServiceDiscovery
    • filter: (arg: Record) => boolean
        • Parameters

          Returns boolean

    • resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>

    Returns void

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.

    Parameters

    Returns PromiseLike<WebClient>

  • Convenient method that looks for a HTTP endpoint and provides the configured . The async result is marked as failed is there are no matching services, or if the lookup fails. This method accepts a configuration for the HTTP client.

    Parameters

    • discovery: ServiceDiscovery
    • filter: (arg: Record) => boolean
        • Parameters

          Returns boolean

    • conf: {}
      • [key: string]: any
    • resultHandler: ((res: AsyncResult<WebClient>) => void) | Handler<AsyncResult<WebClient>>

    Returns void

Generated using TypeDoc