Webhook
public struct Webhook : Codable, Equatable
A webhook that can be used by dialog nodes to make programmatic calls to an external function.
Note: Currently, only a single webhook named main_webhook is supported.
-
The URL for the external service or application to which you want to send HTTP POST requests.
Declaration
Swift
public var url: String -
The name of the webhook. Currently,
main_webhookis the only supported value.Declaration
Swift
public var name: String -
An optional array of HTTP headers to pass with the HTTP request.
Declaration
Swift
public var xheaders: [WebhookHeader]? -
Initialize a
Webhookwith member variables.Declaration
Swift
public init( url: String, name: String, xheaders: [WebhookHeader]? = nil )Parameters
urlThe URL for the external service or application to which you want to send HTTP POST requests.
nameThe name of the webhook. Currently,
main_webhookis the only supported value.xheadersAn optional array of HTTP headers to pass with the HTTP request.
Return Value
An initialized
Webhook.
View on GitHub
Webhook Structure Reference