Request timeout handler
Last updated
Last updated
[io/http/server/utils/Request timeout handler]
Times out a request. If the request reaches the timeout it sends an Request Timeout status as response. Examples:
timeout
set to 60000
{
"baseUrl": "",
"body": "0x495f947276749Ce646f68AC8c248420045cb7b5e,80494307024529346018053650490912529916739680814770830097664395776714464034846",
...
}@0 received via request
{
"status": 200,
"headers": {},
"body": { }
}@0 received via response
{
"status": 200,
"headers": {},
"body": { }
}@0 sent via response
1. `timeout` set to 30 2. { "baseUrl": "", "body": "0x495f947276749Ce646f68AC8c248420045cb7b5e,80494307024529346018053650490912529916739680814770830097664395776714464034846", ... }@0 received via `request` 3. { "status": 200, "headers": {}, "body": { } }@0 received via `response` 4. { "status": 408, "headers": {}, "body": "Request Timeout" }@0 sent via `response`
Keywords: http, rest, api, server, timeout, expire, request
request: any
Receives the request.
response:
Receives the response.
timeout: number
Receives the timeout in milliseconds. Example: 300
response:
Sends response.