Options
All
  • Public
  • Public/Protected
  • All
Menu

Http extended by all http services

Hierarchy

Index

Constructors

Protected constructor

  • new Http(url: string, fetchApi?: any): Http
  • Constructor

    Parameters

    • url: string

      Base catapult-rest url

    • Optional fetchApi: any

      fetch function to be used when performing rest requests.

    Returns Http

Properties

Protected Optional Readonly fetchApi

fetchApi: any

Protected Readonly url

url: string

Methods

Protected call

  • call<D, M>(remoteCall: Promise<D>, mapper: (value: D) => M): Observable<M>
  • This method knows how to call, convert and handle exception when doing remote http operations.

    Type parameters

    • D

    • M

    Parameters

    • remoteCall: Promise<D>

      the remote call

    • mapper: (value: D) => M

      the mapper from dto to the model object.

        • (value: D): M
        • Parameters

          • value: D

          Returns M

    Returns Observable<M>

config

  • config(): Configuration

createNetworkTypeObservable

Static errorHandling

  • errorHandling(error: any): Promise<Error>

Generated using TypeDoc