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

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc