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_webhook
is 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
Webhook
with member variables.Declaration
Swift
public init( url: String, name: String, xheaders: [WebhookHeader]? = nil )
Parameters
url
The URL for the external service or application to which you want to send HTTP POST requests.
name
The name of the webhook. Currently,
main_webhook
is the only supported value.xheaders
An optional array of HTTP headers to pass with the HTTP request.
Return Value
An initialized
Webhook
.