Request timeout handler

[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:

  1. timeout set to 60000

  2. { "baseUrl": "", "body": "0x495f947276749Ce646f68AC8c248420045cb7b5e,80494307024529346018053650490912529916739680814770830097664395776714464034846", ... }@0 received via request

  3. { "status": 200, "headers": {}, "body": { } }@0 received via response

  4. { "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

Input ports

  • request: any

    Receives the request.

  • response:

    {"status": number, "headers": {string: string}, "body": string}

    Receives the response.

  • timeout: number

    Receives the timeout in milliseconds. Example: 300

Output ports

  • response:

    {"status": number, "headers": {string: string}, "body": string}

    Sends response.

Last updated