UNPKG

@eggjs/supertest

Version:

SuperAgent driven library for testing HTTP servers

22 lines (21 loc) 634 B
import type { Server } from 'node:net'; import type { App } from './types.js'; import { Test } from './test.js'; export interface RequestOptions { http2?: boolean; } export 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; }