src/core/smart-http.service.ts
A wrapper over the Http service that handles request errors and sets the withCredentials option for any HTTP request
Properties |
Methods |
constructor(http: HttpClient, injector: Injector)
|
|||||||||
Parameters :
|
Public delete |
delete(url: string, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public get |
get(url: string, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public head |
head(url: string, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public options |
options(url: string, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public patch |
patch(url: string, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public post |
post(url: string, body: any, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public put |
put(url: string, body: any, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public request |
request(url: string, options: any)
|
Type parameters :
|
Returns :
Observable<T>
Observable |
Public handleErrors |
Default value : true
|
onHttpError |
Type : EventEmitter<any>
|
Default value : new EventEmitter<any>()
|
onUnauthorizedRequest |
Type : EventEmitter<void>
|
Default value : new EventEmitter<void>()
|