Class: WebhookClient

WebhookClient(opt) → {WebhookClient}

Client for Webhook system. Can be used to trigger jobs at remote endpoints.

Constructor

new WebhookClient(opt) → {WebhookClient}

Creates a Webhook client that can be used to trigger the jobs at the endpoint.

Parameters:
Name Type Description
opt Object

Options for the Webhook client.

Properties
Name Type Attributes Default Description
secret String

Shared secret between server and client for HMAC signature verification.

url String <optional>
http://localhost

Hostname or IP of the Webhook endpoint.

port Number <optional>
8338

Port of the Webhook server.

data String <optional>

Default data to send with the request if no data is given to the trigger method.

Source:
Returns:
  • The created client.
Type
WebhookClient

Methods

(async) trigger(data)

Sends the request.

Parameters:
Name Type Description
data string

Data to send within the request body.

Source: