Class AbstractServiceAbstract

Abstract service implementing the common base setup for the axios requests of the specific service implementations.

Hierarchy (view full)

Constructors

Properties

_endpoint: string

Specific webservice endpoint.

An absolute URL, which means a path with leading slash ('/') relative to the IServiceConfig.controllerUrl (ProCon.IP base address).

_method: Method

HTTP request method.

Must be one of the valid HTTP request methods like GET, POST, etc. See axios/Method type:

export type Method =
| 'get' | 'GET'
| 'delete' | 'DELETE'
| 'head' | 'HEAD'
| 'options' | 'OPTIONS'
| 'post' | 'POST'
| 'put' | 'PUT'
| 'patch' | 'PATCH'
| 'purge' | 'PURGE'
| 'link' | 'LINK'
| 'unlink' | 'UNLINK'
_requestHeaders: {
    [key: string]: string;
}

Custom HTTP headers.

Custom headers can be defined in form of a key value pair.

this._requestHeaders["Cache-Control"] = "no-cache";
log: ILogger

Logger which will be used for all logging events.

Accessors

  • get axiosRequestConfig(): AxiosRequestConfig<any>
  • Get an axios/AxiosRequestConfig object.

    Returns AxiosRequestConfig<any>

  • get url(): string
  • Get the webservice url (joined base url and endpoint).

    Returns string

    URL string (joined base url and endpoint).