You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* move lib
* add webhook lib
* add webhook setting
* add webhook test case
* add webhook test case
* implement the webhook execute function
* update test case
* update webhook
* update test case
* update README
* update README
* update README
* update settings
Copy file name to clipboardExpand all lines: README.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ Currently supports updating A records for subdomains. Doesn't support updating o
53
53
-[Slack](#slack)
54
54
-[Discord](#discord)
55
55
-[Pushover](#pushover)
56
+
-[Webhook](#webhook)
56
57
-[Miscellaneous topics](#miscellaneous-topics)
57
58
-[IPv6 support](#ipv6-support)
58
59
-[Network interface IP address](#network-interface-ip-address)
@@ -645,6 +646,51 @@ The `message_template` property supports [html](https://pushover.net/api#html) i
645
646
If the `device` and `title` parameters are left empty, Pushover will choose defaults [see](https://pushover.net/api#messages). More details on the priority parameter
646
647
can be found on the Pushover [API description](https://pushover.net/api#priority).
647
648
649
+
### Webhook
650
+
651
+
Webhook is another feature that GoDNS provides to deliver notifications to the other applications while the IP is changed. GoDNS delivers a notification to the target URL via an HTTP `GET` or `POST` request.
652
+
653
+
The configuration section `webhook` is used for customizing the webhook request. In general, there are 2 fields used for the webhook request:
654
+
655
+
>*`url`: The target URL for sending webhook request.
656
+
>*`request_body`: The content for sending `POST` request, if this field is empty, a HTTP GET request will be sent instead of the HTTP POST request.
For this example, a webhook will be triggered when the IP changes, the target URL `http://localhost:5000/api/v1/send` will receive an `HTTP POST` request with request body:
0 commit comments