ngx-bit
Version:
A flexible NG-ZORRO helper library
32 lines (31 loc) • 803 B
TypeScript
import { HttpClient } from '@angular/common/http';
import { Observable, OperatorFunction } from 'rxjs';
import { BitConfig } from './bit-config';
export declare class BitHttpService {
private http;
/**
* 基础路径
* base URL
*/
readonly baseUri: string;
/**
* 是否同源
*/
readonly withCredentials: boolean;
/**
* 请求拦截器
* Http interceptor
*/
private interceptor;
constructor(bitConfig: BitConfig, http: HttpClient);
/**
* 设置请求拦截器
* Http interceptor
*/
setupInterceptor(operate: OperatorFunction<any, any>): void;
/**
* 发起请求客户端
* Http client
*/
req(url: string, body?: any, method?: string): Observable<any>;
}