UNPKG

my-test123

Version:
22 lines (21 loc) 858 B
import { Http, RequestOptions, Response } from '@angular/http'; import { AuthenticationService } from 'ngx-login-client'; import { Observable } from 'rxjs/Observable'; /** * This class is an abstract of Angular2 HTTP * Extended from Angular2 HTTP * * Purpose: * Error handling on API services * To implement a general retry logic */ export declare class HttpService extends Http { private headers; constructor(backend: any, options: RequestOptions, auth: AuthenticationService); private setHeaders(options); get(url: string, options?: {}): Observable<Response>; post(url: string, body: any, options?: {}): Observable<Response>; put(url: string, body: any, options?: {}): Observable<Response>; patch(url: string, body: any, options?: {}): Observable<Response>; delete(url: string, options?: {}): Observable<Response>; }