ngx-restful-client
Version:
The ultimate Angular library to exquisitely declare and implement the REST APIs you'll use in your application.
35 lines (34 loc) • 919 B
TypeScript
import { HttpEvent, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
/**
* <p>
* Define o tipo de resposta que será retornado pela chamada http.
* </p>
* <p>
* Defines the response type that will be returned by the http call.
* </p>
* <ul>
* <li>Body</li>
* <li>HttpEvent</li>
* <li>HttpResponse</li>
* </ul>
*
*/
export interface ResponseObserve<T> {
/**
* @returns Returns an Observable<T> where T is the parametrized type of the object.
*/
body(): Observable<T>;
/**
* @returns Returns an Observable<HttpEvent<T>> where T is the parametrized type of the object.
*
* @see HttpEvent
*/
events(): Observable<HttpEvent<T>>;
/**
* @returns Returns an Observable<HttpResonse<T>> where T is the parametrized type of the object.
*
* @see HttpResponse
*/
response(): Observable<HttpResponse<T>>;
}