Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1 KB

README.md

File metadata and controls

40 lines (29 loc) · 1 KB

Webhooker

Webhooker is an example implementation of webhook service. It allows for posting a message to the webhook. The list of all posted message can then be displayed.

Installation

go build webhooker.go

Usage

To create a new service token:

webhooker createToken --dburi <mongodb_connection_string>

To start the webhook service, execute:

webhooker listen --certfile <certificate.crt> --keyfile <certificate.key> --dburi <mongodb_connection_string> --listen-address [ip_address]<:port>

To post a message to the webhook service:

curl -k -X POST -H 'Content-Type: application/json' -d '{"token":"<token>","channel":"<channel_not_used_yet>","message":"<message_to_be_posted>"}' https://<ip_address>:<port>/webhook

To display already posted messages, visit:

curl -k https://<ip_address>:<port>/wall

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GPL 3.0