Support HEAD requests for Webhook endpoints
Open
@enykeev is already working on this.
Since Nov 22, 2016.
enhancement
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Webhook endpoints do not appear to support HEAD requests. Different services use HEAD to validate a webhook URL prior permitting it to be registered, e.g. Trello. Supporting HEAD requests seams to be a generally accepted component of a properly developed webhooks system.
As an example, I set up a webhook at /api/v1/webhooks/trello and performed two requests against it:
HEAD Request
Status: 404
Headers:
Access-Control-Allow-Headers →Content-Type,Authorization,X-Auth-Token,St2-Api-Key,X-Request-ID
Access-Control-Allow-Methods →GET,POST,PUT,DELETE,OPTIONS
Access-Control-Allow-Origin →http://127.0.0.1:3000
Access-Control-Expose-Headers →Content-Type,X-Limit,X-Total-Count,X-Request-ID
Connection →keep-alive
Content-Length →57
Content-Type →application/json
Date →Tue, 27 Sep 2016 23:03:11 GMT
Server →nginx/1.10.1
GET Request:
Status: 200
Body:
{
"uid": "trigger:core:b3d0af1a-5535-4fad-8345-b91a8fd3ffbf:8f44bbbb76667c8e5ab60e05b708d2e2",
"parameters": {
"url": "trello"
},
"name": "b3d0af1a-5535-4fad-8345-b91a8fd3ffbf",
"type": "core.st2.webhook",
"id": "57eac1a8250e5a030d81cbb0",
"pack": "core"
}
Headers:
Access-Control-Allow-Headers →Content-Type,Authorization,X-Auth-Token,St2-Api-Key,X-Request-ID
Access-Control-Allow-Methods →GET,POST,PUT,DELETE,OPTIONS
Access-Control-Allow-Origin →http://127.0.0.1:3000
Access-Control-Expose-Headers →Content-Type,X-Limit,X-Total-Count,X-Request-ID
Connection →keep-alive
Content-Length →252
Content-Type →application/json; charset=UTF-8
Date →Tue, 27 Sep 2016 23:26:46 GMT
Front-End-Https →on
Server →nginx/1.10.1
X-Content-Type-Options →nosniff
X-Request-ID →39ced76e-47ad-473b-9c39-0588a19d549c
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.