UNPKG

jade-integration-utils

Version:

A tool made for any type of http requisitions and to manage localstorage. This package works into Angular and Ionic projects (maybe you can run this in ReactNative, MAYBE!).

20 lines (19 loc) 654 B
export declare class HttpXHRService { private _xhttp; private _standard_url; private _AUTH; private _headers; constructor(standard_api_url: string, headers?: Array<{ header: string; value: string; }>); set_token(auth: string): void; get_token(): string; get<T>(endpoint: string): Promise<T>; get_file<T>(endpoint: string): Promise<T>; post<T>(endpoint: string, body: any): Promise<T>; formData<T>(endpoint: string, body: FormData): Promise<T>; put<T>(endpoint: string, body: any): Promise<T>; delete<T>(endpoint: string): Promise<T>; private _send_request; }