Skip to main content
ClientRequest.prototype.setTimeout - node__http.d.ts - Node documentation
method ClientRequest.prototype.setTimeout

Usage in Deno

```typescript import { ClientRequest } from "node:node__http.d.ts"; ```
ClientRequest.prototype.setTimeout(
timeout: number,
callback?: () => void,
): this
Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.

Parameters

timeout: number
Milliseconds before a request times out.
optional
callback: () => void
Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.

Return Type

this