UNPKG

ngx-http-client-service

Version:

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END -->

78 lines (77 loc) 3.76 kB
import { HttpClient } from '@angular/common/http'; import { HttpOptionsService } from '../http-options/http-options.service'; import { HttpOptions } from '../../models/http-options.model'; import { ApiPathService } from '../api-path/api-path.service'; import { Observable } from 'rxjs'; /** * @description Injectable Http Client Service */ export declare class NgxHttpClientService { private httpClient; private httpOptionsService; private apiPathService; /** * @description Creates an instance of http client service. * @param httpClient - an instance of HttpClient * @param httpOptionsService - an instance of HttpOptionsService */ constructor(httpClient: HttpClient, httpOptionsService: HttpOptionsService, apiPathService: ApiPathService); /** * @description will expose get method of http client. * @param pathParams contains path parameters of type string array * @param HttpOptions contains parameter of type HttpOptions. */ get(pathParams: string[], httpOptions?: HttpOptions): Observable<object>; /** * @description will expose post method of http client. * @param pathParams contains path parameters of type string array * @param HttpOptions contains parameter of type HttpOptions. * @param body contains parameter for http post body */ post(pathParams: string[], body: any, httpOptions?: HttpOptions): Observable<object>; /** * @description will expose put method of http client. * @param pathParams contains path parameters of type string array * @param HttpOptions contains parameter of type HttpOptions. * @param body contains parameter for http put body */ put(pathParams: string[], body: any, httpOptions?: HttpOptions): Observable<object>; /** * @description will expose delete method of http client. * @param pathParams contains path parameters of type string array * @param HttpOptions contains parameter of type HttpOptions. */ delete(pathParams: string[], httpOptions?: HttpOptions): Observable<object>; /** * @description will expose request method of http client. * @param method contains the method parameter of type string. * @param pathParams contains path parameters of type string array. * @param HttpOptions contains parameter of type HttpOptions. */ request(method: string, pathParams: string[], httpOptions?: HttpOptions): Observable<object>; /** * @description will expose head method of http client. * @param pathParams contains path parameters of type string array. * @param HttpOptions contains parameter of type HttpOptions. */ head(pathParams: string[], httpOptions?: HttpOptions): Observable<object>; /** * @description will expose jsonp method of http client. * @param pathParams contains path parameters of type string array. * @param callbackFn contains parameter of type string. */ jsonp(pathParams: string[], callbackFn: string): Observable<object>; /** * @description will expose options method of http client. * @param pathParams contains path parameters of type string array. * @param HttpOptions contains parameter of type HttpOptions. */ options(pathParams: string[], httpOptions?: HttpOptions): Observable<object>; /** * @description will expose patch method of http client. * @param pathParams contains path parameters of type string array. * @param body of type any. * @param HttpOptions contains parameter of type HttpOptions. */ patch(pathParams: string[], body: any, httpOptions?: HttpOptions): Observable<object>; }