HTTPRequest
interface HTTPRequest {
headers?: Record<string, string>;
method?: string;
timeout?: number;
url: string;
}
headers?: Record<string, string>;
method?: string;
timeout?: number;
url: string;
}
Index
Properties
Properties
Optionalheaders
HTTP headers to send with the request.
Pass an object whose keys are the header names and its values are the header values.
Optionalmethod
method?: string
The HTTP method to use, one of GET, POST, PUT, HEAD, etc.
Optionaltimeout
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.
url
url: string
The URL to send the request to.
This request object holds information to send in an HTTP request.
Since
1.15.0