ngx-restful-client
Version:
The ultimate Angular library to exquisitely declare and implement the REST APIs you'll use in your application.
29 lines (28 loc) • 1.13 kB
TypeScript
import { HttpMethodDispatcher } from './http-method-dispatcher';
import { HttpOptions, QueryParamsSupplier } from '../core';
import { HttpDelete, HttpGet, HttpPatch, HttpPost, HttpPut } from './methods';
export declare type CfgOpts = (options?: HttpOptions | QueryParamsSupplier) => HttpOptions;
/**
* Agrega os tipos de retornos disponíveis para cada método HTTP: GET, PUT, POST,PATCH, DELETE
*
* - JSON;
* - BLOB;
* - ARRAYBUFFER;
* - TEXT.
*
* com a possibilidade de escolher o que será observado:
* - BODY;
* - EVENTS;
* - RESPONSE.
*
*/
export declare class HttpMethodResponse {
private readonly dispatcher;
private readonly configOpts;
constructor(dispatcher: HttpMethodDispatcher, configOpts?: CfgOpts);
get<T>(options?: HttpOptions | QueryParamsSupplier): HttpGet<T>;
put<T>(body?: any, options?: HttpOptions | QueryParamsSupplier): HttpPut<T>;
post<T>(body?: any, options?: HttpOptions | QueryParamsSupplier): HttpPost<T>;
patch<T>(body?: any, options?: HttpOptions | QueryParamsSupplier): HttpPatch<T>;
delete<T>(options?: HttpOptions | QueryParamsSupplier): HttpDelete<T>;
}