flagpole
Version:
Simple and fast DOM integration, headless or headful browser, and REST API testing framework.
26 lines (25 loc) • 854 B
TypeScript
import * as puppeteer from "puppeteer-core";
import { NeedleResponse } from "needle";
import { KeyValue } from "./interfaces";
export declare type probeImageResponse = {
width: number;
height: number;
type: string;
mime: string;
wUnits: string;
hUnits: string;
url: string;
};
export declare class HttpResponse {
body: string;
statusCode: number;
statusMessage: string;
headers: KeyValue;
cookies: KeyValue;
private constructor();
static createEmpty(): HttpResponse;
static fromNeedle(response: NeedleResponse): HttpResponse;
static fromPuppeteer(response: puppeteer.Response, body: string, cookies?: KeyValue): HttpResponse;
static fromProbeImage(response: probeImageResponse, cookies?: KeyValue): HttpResponse;
static fromLocalFile(relativePath: string): Promise<HttpResponse>;
}