Antonio
06/12/2024, 7:35 AM/notifications endpoint that I want to use as recipient for the webhook. My current issue is with creation of the webhook, and specifically that attempts at creating the webhook return 401 with the execution line below:
docker run --rm --network="host" pactfoundation/pact-cli:latest pact-broker create_webhook <http://localhost:8080/notifications> -X POST -b <http://localhost:9292/webhooks> -u pactBrokerUsername -p pactBrokerUserPassword -d "{\"events\":[{\"name\":\"contract_content_changed\"}],\"request\":{\"method\":\"POST\",\"url\":\"http:/localhost:8080/notifications\",\"headers\":{\"Content-Type\":\"application/json\"},\"body\":{\"some\":\"json\"}}}" --contract-published
In the line above:
• http://localhost:9292 is the URL for the PACT broker
• http://localhost:8080 is the URL for the recipient of the webhook, the simple app that I want to receive notifications.
I formed this line looking at the PACT documentation, however I find quite a lot of what is being said there confusing so evidently something is misplaced or missing. I would appreciate some help with this from whoever has created webhooks before.Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Antonio
06/13/2024, 7:09 AMPOST request to /webhooks with the body described below. You can also do a PUT to `/webhooks/{uuid}`"
https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/doc/views/webhooks.markdown
If that is not true then maybe somebody should change it?Yousaf Nabi (pactflow.io)
Antonio
06/13/2024, 8:24 AM