api/api.service.ts
Properties |
Methods |
constructor(client: FetchClient)
|
||||||
Parameters :
|
addInterceptor | ||||||||||||
addInterceptor(interceptor: HttpInterceptor, id?: string)
|
||||||||||||
Allows to intercept requests performed via the FetchClient requests.
Parameters :
Returns :
string
The id of the interceptor (same as provided id if one was provided, otherwise an id will be generated). |
hookRequest | ||||||||
hookRequest(hookFilter: (call: ApiCall) => void)
|
||||||||
Allows to hook into the requests performed by the FetchClient. This is meant to be used to react on the requests, not for manipulation of the requests.
Parameters :
Returns :
any
An Observable of the filtered requests. |
hookResponse | ||||||||
hookResponse(hookFilter: (call: ApiCall) => void)
|
||||||||
Allows to hook into the responses received by the FetchClient. This is meant to be used to react on the responses, not for manipulation of the responses.
Parameters :
Returns :
any
An Observable of the filtered responses. |
Async onFinish | ||||||
onFinish(call: ApiCall)
|
||||||
Parameters :
Returns :
any
|
onStart | ||||||
onStart(call: ApiCall)
|
||||||
Parameters :
Returns :
void
|
removeInterceptor | ||||||||
removeInterceptor(id: string)
|
||||||||
Allows to remove a previously added interceptor by it's id.
Parameters :
Returns :
boolean
true if an interceptor existed and has been removed, or false if id does not exist. |
Async resolveData | ||||||
resolveData(call: ApiCall)
|
||||||
Parameters :
Returns :
Promise<any>
|
calls |
Type : Observable<ApiCall>
|