@eggjs/supertest
Version:
SuperAgent driven library for testing HTTP servers
25 lines (24 loc) • 658 B
TypeScript
import { App } from "./types.js";
import { Test } from "./test.js";
import { Server } from "node:net";
//#region src/request.d.ts
interface RequestOptions {
http2?: boolean;
}
declare class Request {
#private;
app: string | Server;
constructor(appOrListener: App, options?: RequestOptions);
protected _testRequest(method: string, url: string): Test;
delete(url: string): Test;
del(url: string): Test;
get(url: string): Test;
head(url: string): Test;
put(url: string): Test;
post(url: string): Test;
patch(url: string): Test;
options(url: string): Test;
trace(url: string): Test;
}
//#endregion
export { Request, RequestOptions };