UNPKG

ngx-restful

Version:

AngularX module for easy integration with RESTful API.

17 lines (16 loc) 838 B
import { HttpClient, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { BaseService } from './base-service'; export declare abstract class RestService<T, E> extends BaseService { protected http: HttpClient; private headers; constructor(http: HttpClient); query(options?: Object, path?: string): Observable<T[]>; getResponse(options?: Object, path?: string): Observable<HttpResponse<T>>; getAll(path?: string): Observable<T[]>; getOne(id: number, options?: Object, path?: string): Observable<T>; createOne(model: T, options?: Object, path?: string): Observable<E>; updateOne(model: T, options?: Object, path?: string): Observable<E>; deleteOne(id: number, options?: Object, path?: string): Observable<E>; abstract getBaseUrlPath(): string; }