Skip to content

web.setReadTimeout ^v2.7.94

Sets the maximum allowed inactivity time while receiving a response during an HTTP request. The default read timeout is 30 seconds.

js
web.setReadTimeout(seconds)

Parameters

  • seconds (integer): The maximum time allowed for inactivity between receiving chunks of data from the server.

Examples

js
web.setReadTimeout(60); // Set read timeout to 60 seconds

Notes

  • This timeout does not apply to the total time required to read the full response but rather to periods of inactivity while waiting for the next byte from the server.
  • If the server takes longer than the specified time to send the next chunk of data, the request will be aborted, and an error will be returned.