A constructed http request that has yet to be sent.

Use one of the send methods to send it.

Constructors

  • Parameters

    Returns Request

Properties

headers?: Record<string, string>
method: string
path: string
scriptId?: number

Methods

  • Send this request with a optional body.

    Note: if you dont consume the response body you should call Response.body.close() (this is done automatically after 30 seconds if you don't, but if you're sending a lot of requests its better to do it yourself)

    Parameters

    Returns Promise<Response>

    A promise that resolbes with the response

  • Parameters

    • data: any

    Returns Promise<Response>

  • Parameters

    • data: string

    Returns Promise<Response>

  • Parameters

    • okay: ((val) => any)
        • (val): any
        • Parameters

          Returns any

    • rejected: ((err) => unknown)
        • (err): unknown
        • Parameters

          • err: any

          Returns unknown

    Returns Promise<any>

Generated using TypeDoc