Class Voice.VoiceWebhook
- Namespace
- Vonage.Applications.Capabilities
- Assembly
- Vonage.dll
Represents a webhook for Voice API.
public record Voice.VoiceWebhook : IEquatable<Voice.VoiceWebhook>
- Inheritance
-
Voice.VoiceWebhook
- Implements
- Inherited Members
Constructors
VoiceWebhook(Uri, HttpMethod, int, int)
Represents a webhook for Voice API.
public VoiceWebhook(Uri Address, HttpMethod Method, int ConnectionTimeout = 1000, int SocketTimeout = 500)
Parameters
AddressUriThe webhook address.
MethodHttpMethodMust be one of GET or POST.
ConnectionTimeoutintIf Vonage can't connect to the webhook URL for this specified amount of time, then Vonage makes one additional attempt to connect to the webhook endpoint. This is an integer value specified in milliseconds.
SocketTimeoutintIf a response from the webhook URL can't be read for this specified amount of time, then Vonage makes one additional attempt to read the webhook endpoint. This is an integer value specified in milliseconds.
Properties
Address
The webhook address.
[JsonProperty("address", Order = 1)]
public Uri Address { get; init; }
Property Value
ConnectionTimeout
If Vonage can't connect to the webhook URL for this specified amount of time, then Vonage makes one additional attempt to connect to the webhook endpoint. This is an integer value specified in milliseconds.
[JsonProperty("connect_timeout", Order = 2)]
public int ConnectionTimeout { get; init; }
Property Value
Method
Must be one of GET or POST.
[JsonProperty("http_method", Order = 0)]
[JsonConverter(typeof(HttpMethodConverter))]
public HttpMethod Method { get; init; }
Property Value
SocketTimeout
If a response from the webhook URL can't be read for this specified amount of time, then Vonage makes one additional attempt to read the webhook endpoint. This is an integer value specified in milliseconds.
[JsonProperty("socket_timeout", Order = 3)]
public int SocketTimeout { get; init; }