@seriouslag/httpclient
Version:
Typed wrapper HttpClient for axios
10 lines (9 loc) • 500 B
TypeScript
import { Request, HttpResponse } from '../Adaptors';
import { HttpRequestStrategy } from './HttpRequestStrategy';
/** The default HTTP request strategy. No logic. */
export declare class DefaultHttpRequestStrategy implements HttpRequestStrategy {
/** Passthrough request to axios and check response is successful */
request<T = unknown>(request: Request<T>): Promise<HttpResponse<T>>;
/** Validates the HTTP response is successful or throws an error */
private checkResponseStatus;
}