import type { HttpClient } from './httpclient'; import type { PipeOptions, HttpMethods } from "./options"; import type { IHttpClientHandler } from './httpclien-handler'; export interface HttpClientIntercepter { handle(request: IntercepterRequestContext, next: IntercepterDelegate): Promise; } export interface IntercepterRequestContext { url: string; readonly method: HttpMethods; header?: any; data?: any; responseType?: "text" | "arraybuffer"; pipeOptions: PipeOptions; } export interface IntercepterResponseContext { httpClient?: HttpClient; httpClientHander?: IHttpClientHandler; statusCode: number; data: any; error?: any; header: any; pipeOptions: PipeOptions; } export interface IntercepterDelegate { (request: IntercepterRequestContext): Promise; }