@tdb/util
Version:
Shared helpers and utilities.
21 lines (20 loc) • 456 B
TypeScript
export declare type HttpMethod = 'GET' | 'POST';
export declare type IHttpResponse<T> = {
ok: boolean;
status: number;
statusText: string;
elapsed: number;
data: T;
};
export declare type IHttpHeaders = {
[key: string]: string;
};
export declare type IHttpEvent = {
id: string;
stage: 'START' | 'COMPLETE';
method: HttpMethod;
headers: Headers;
url: string;
data?: any;
response?: IHttpResponse<any>;
};