UNPKG

rs-restangular

Version:

Restful Resources service for Angular 2 apps

18 lines (17 loc) 897 B
import { RestangularPath } from './path'; import { Http, Headers, Request, Response, URLSearchParams } from '@angular/http'; export declare type responseInterceptor = (res: any, operation?: string, path?: RestangularPath, url?: string, response?: Response) => any; export declare type requestInterceptor = (req: Request, operation?: string, path?: RestangularPath) => Request; export declare class RestangularConfig { private _baseUrl; private _requestInterceptors; private _responseInterceptors; defaultHeaders: Headers; defaultParams: URLSearchParams; http: Http; addResponseInterceptor(interceptor: responseInterceptor): RestangularConfig; addRequestInterceptor(interceptor: requestInterceptor): RestangularConfig; readonly responseInterceptors: Array<responseInterceptor>; readonly requestInterceptors: Array<requestInterceptor>; baseUrl: string; }