export type HttpMethod = 'GET' | 'POST';

export type IHttpResponse<T> = {
  ok: boolean;
  status: number;
  statusText: string;
  elapsed: number; // Milliseconds.
  data: T;
};

export type IHttpHeaders = {
  [key: string]: string;
};

export type IHttpEvent = {
  id: string;
  stage: 'START' | 'COMPLETE';
  method: HttpMethod;
  headers: Headers;
  url: string;
  data?: any;
  response?: IHttpResponse<any>;
};
