Skip to main content
Module

x/denock/src/type.ts>DenockOptions

Denock intercepts HTTP calls to allow mocking response from third parties API
Latest
interface DenockOptions
import { type DenockOptions } from "https://deno.land/x/denock@0.2.0/src/type.ts";

Properties

method: HTTPMethods
protocol: "http" | "https"
host: string
optional
port: number
optional
path: string
optional
queryParams: any
optional
headers: Array<{ header: string; value: string; }>
optional
requestBody: any

This is the body that the request must contains to be intercepted

optional
replyStatus: number

This is the status code that will be returned on interception

responseBody: any

This is the body that will be returned on interception

optional
interception: number

Represent the number of call you wants to intercept