pub struct WebhookTarget {
pub headers: HashMap<String, String>,
pub url: Url,
}Expand description
Target configuration for webhook delivery. Specifies the destination URL and any custom headers to include in webhook requests.
JSON schema
{
"description": "Target configuration for webhook delivery.\nSpecifies the destination URL and any custom headers to include in webhook requests.\n",
"examples": [
{
"headers": {
"Authorization": "Bearer token123",
"Content-Type": "application/json"
},
"url": "https://api.example.com/webhooks"
}
],
"type": "object",
"required": [
"url"
],
"properties": {
"headers": {
"description": "Additional headers to include in webhook requests.",
"examples": [
{
"Authorization": "Bearer token123",
"Content-Type": "application/json"
}
],
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"url": {
"description": "The webhook URL to deliver events to.\n\nMust be a publicly accessible HTTPS URL that responds to HEAD requests with a 200 status code.\n\nIf the URL is not publicly accessible or doesn't respond to HEAD requests with a 200 status code, the URL will be rejected with a 400.\n",
"examples": [
"https://api.example.com/webhooks"
],
"allOf": [
{
"$ref": "#/components/schemas/Url"
}
]
}
}
}Fields§
§headers: HashMap<String, String>Additional headers to include in webhook requests.
url: UrlThe webhook URL to deliver events to.
Must be a publicly accessible HTTPS URL that responds to HEAD requests with a 200 status code.
If the URL is not publicly accessible or doesn't respond to HEAD requests with a 200 status code, the URL will be rejected with a 400.Implementations§
Source§impl WebhookTarget
impl WebhookTarget
pub fn builder() -> WebhookTarget
Trait Implementations§
Source§impl Clone for WebhookTarget
impl Clone for WebhookTarget
Source§impl Debug for WebhookTarget
impl Debug for WebhookTarget
Source§impl<'de> Deserialize<'de> for WebhookTarget
impl<'de> Deserialize<'de> for WebhookTarget
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&WebhookTarget> for WebhookTarget
impl From<&WebhookTarget> for WebhookTarget
Source§fn from(value: &WebhookTarget) -> Self
fn from(value: &WebhookTarget) -> Self
Converts to this type from the input type.
Source§impl From<WebhookTarget> for WebhookTarget
impl From<WebhookTarget> for WebhookTarget
Source§fn from(value: WebhookTarget) -> Self
fn from(value: WebhookTarget) -> Self
Converts to this type from the input type.
Source§impl Serialize for WebhookTarget
impl Serialize for WebhookTarget
Source§impl TryFrom<WebhookTarget> for WebhookTarget
impl TryFrom<WebhookTarget> for WebhookTarget
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: WebhookTarget) -> Result<Self, ConversionError>
fn try_from(value: WebhookTarget) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for WebhookTarget
impl RefUnwindSafe for WebhookTarget
impl Send for WebhookTarget
impl Sync for WebhookTarget
impl Unpin for WebhookTarget
impl UnsafeUnpin for WebhookTarget
impl UnwindSafe for WebhookTarget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more