Search


Search something to see results

HTTPRequest

This request object holds information to send in an HTTP request.

1.15.0

interface HTTPRequest {
    headers?: Record<string, string>;
    method?: string;
    timeout?: number;
    url: string;
}

Index

Properties

Properties

headers?: Record<string, string>

HTTP headers to send with the request.

Pass an object whose keys are the header names and its values are the header values.

1.15.0

{}
method?: string

The HTTP method to use, one of GET, POST, PUT, HEAD, etc.

1.15.0

"GET"
timeout?: number

The timeout in milliseconds after which the request should fail.

If no timeout is given or the timeout is zero, the timeout will not be set.

1.15.0

url: string

The URL to send the request to.

1.15.0