bia-framework
Version:
Bia Framework to work with angular 2
25 lines (24 loc) • 915 B
TypeScript
import { Http, Response } from "@angular/http";
import { Observable } from "rxjs/Observable";
import { ConfigService } from "./ConfigService";
import 'rxjs/add/operator/map';
export declare class WebApiService {
private http;
private config;
private _apiAddress;
private _urlParameter;
private _data;
private _resource;
private _method;
private _canSendToken;
private _contentType;
constructor(http: Http, config: ConfigService);
setApiAddress: (newAddress: string) => void;
Content: (data: Object) => WebApiService;
Resource: (resource: string) => WebApiService;
ContentType: (contentType: string) => WebApiService;
Method: (method: string) => WebApiService;
CanSendToken: (canSendToken: boolean) => WebApiService;
Parameters: (parameters: Object) => WebApiService;
Execute: <T extends Response>() => Observable<T>;
}