import { HTTP_METHODS } from '../constants'; import { KeyValueObject } from '../../..'; export interface HttpHeader { [key: string]: string | number; } export interface HttpQuery { [key: string]: string | number; } export interface IRequestOptions { url?: string; headers?: H; body?: string; method?: HTTP_METHODS; } export interface IResponse { headers: H; body?: string; ok?: boolean; status?: string | number; statusText?: string | number; } export interface CanRequest = IResponse> { request(url: string, method: HTTP_METHODS, options?: IRequestOptions): Promise; } export interface CanRestRequest = IResponse> extends CanRequest { post(url: string, options?: IRequestOptions): Promise; get(url: string, options?: IRequestOptions): Promise; patch(url: string, options?: IRequestOptions): Promise; put(url: string, options?: IRequestOptions): Promise; delete(url: string, options?: IRequestOptions): Promise; option(url: string, options?: IRequestOptions): Promise; } export interface VerificationResult extends KeyValueObject { }