Options
All
  • Public
  • Public/Protected
  • All
Menu

a high level http client that will send traffic to Envoy:

  1. all HTTP GET / POST ... will be wrapped as async signature
  2. doing JSON RESET API common works: accepting object, return objects, only works with application/json
  3. none 2XX request will be throw as Error

Hierarchy

  • EnvoyHttpClient

Index

Constructors

constructor

Properties

envoyContext

envoyContext: EnvoyContext

the envoy context where you can read

Methods

actionWithBody

actionWithoutBody

delete

  • send a DELETE request and expecting return json or empty

    throws

    Error for none 2XX request, a $statusCode will be available in the error object

    Parameters

    • url: string

      the URL to get

    • Optional init: EnvoyHttpRequestInit

      the params for the request, like retry, timeout

    Returns Promise<any>

get

  • send a GET request and expecting return json or empty

    throws

    Error for none 2XX request, a $statusCode will be available in the error object

    Parameters

    • url: string

      the URL to get

    • Optional init: EnvoyHttpRequestInit

      the params for the request, like retry, timeout

    Returns Promise<any>

patch

  • send a PATCH request and expecting return json or empty

    throws

    Error for none 2XX request, a $statusCode will be available in the error object

    Parameters

    • url: string

      the URL to get

    • body: any

      the request object, will be serialize to JSON when sending out

    • Optional init: EnvoyHttpRequestInit

      the params for the request, like retry, timeout

    Returns Promise<any>

post

  • send a POST request and expecting return json or empty

    throws

    Error for none 2XX request, a $statusCode will be available in the error object

    Parameters

    • url: string

      the URL to get

    • body: any

      the request object, will be serialize to JSON when sending out

    • Optional init: EnvoyHttpRequestInit

      the params for the request, like retry, timeout

    Returns Promise<any>

put

  • send a PUT request and expecting return json or empty

    throws

    Error for none 2XX request, a $statusCode will be available in the error object

    Parameters

    • url: string

      the URL to get

    • body: any

      the request object, will be serialize to JSON when sending out

    • Optional init: EnvoyHttpRequestInit

      the params for the request, like retry, timeout

    Returns Promise<any>

Private returnJsonOrError

Legend

  • Constructor
  • Property
  • Method
  • Private property
  • Private method
  • Property
  • Inherited property

Generated using TypeDoc