Skip to main content


Super-agent driven library for testing Deno HTTP servers.
interface IRequest
implements Promise<IResponse>
import { type IRequest } from "";


cookies: string
method: string
url: string


new(method: string, url: string): IRequest

Initialize a new Request with the given method and url.

agent(agent?: any): this
abort(): void
accept(type: string): this
field: string,
file: MultipartValueSingle,
options?: string | { filename?: string; contentType?: string; },
): this
user: string,
pass: string,
options?: { type: "basic" | "auto"; },
): this
auth(token: string, options: { type: "bearer"; }): this
buffer(val?: boolean): this
ca(cert: any | any[]): this
cert(cert: any | any[]): this
clearTimeout(): this
disableTLSCerts(): this
end(callback?: CallbackHandler): void
field(name: string, val: MultipartValue): this
field(fields: { [fieldName: string]: MultipartValue; }): this
get(field: string): string
http2(enable?: boolean): this
key(cert: any | any[]): this
ok(callback: (res: IResponse) => boolean): this
on(name: "error", handler: (err: any) => void): this
on(name: "progress", handler: (event: ProgressEvent) => void): this
on(name: "response", handler: (response: IResponse) => void): this
on(name: string, handler: (event: any) => void): this
parse(parser: Parser): this
part(): this
pfx(cert: any | any[] | { pfx: string | any; passphrase: string; }): this
pipe(stream: any, options?: object): any
query(val: object | string): this
redirects(n: number): this
responseType(type: string): this
retry(count?: number, callback?: CallbackHandler): this
send(data?: string | object): this
serialize(serializer: Serializer): this
set(field: object): this
set(field: string, val: string): this
set(field: "Cookie", val: string[]): this
timeout(ms: number | { deadline?: number; response?: number; }): this
trustLocalhost(enabled?: boolean): this
type(val: string): this
unset(field: string): this
use(fn: Plugin): this
withCredentials(): this
write(data: string | any, encoding?: string): boolean
maxResponseSize(size: number): this