Skip to content
Igor Balos edited this page Jun 19, 2018 · 6 revisions

Endpoint

/hook/{hook_id} - PUT

Description

This endpoint let's you add additional response options to POST/GET /hook/{hook_id} endpoints. For example, you could set additional response to be a delay in response of 5 seconds.

Querystring parameters

  • clear - allows you to clear all data or responses from the endpoint. Possible values: "data", "response" , "data,response"
  • response_status - allows you to set HTTP status to X number for each next POST/GET request to /hook/{hook_id}
  • response_delay - allows you to set delayed response for X seconds for each next POST/GET request to /hook/{hook_id}

Examples

Request

In this example, http response is set to 500, response delay is set to 3 seconds.

CURL -X PUT 'http://localhost:8888/hook/8a85d917-22af-7928-a4e1-148c980b3bc8?response_status=500&response_delay=3' -d ''"

Response

{
    "Message":"Status set to 500. Delay set to 3."
}

Request

In this example, any http and delayed responses are cleared and set to default (status 200, delay 0 seconds).

CURL -X PUT 'http://localhost:8888/hook/8a85d917-22af-7928-a4e1-148c980b3bc8?clear=data,response' -d ''"

Response

{
    "Message":"Cleared data. Cleared response modifications."
}