pub struct WebhookRequest {Show 13 fields
pub name: String,
pub description: Option<String>,
pub payload_url: String,
pub http_method: Option<HttpMethod>,
pub http_content_type: Option<String>,
pub additional_headers: Option<String>,
pub body_template: Option<String>,
pub secret: Option<String>,
pub ssl_verification: Option<bool>,
pub ca_file_path: Option<Option<String>>,
pub custom_fields: Option<HashMap<String, Value>>,
pub owner: Option<Option<Box<AsnRangeRequestOwner>>>,
pub tags: Option<Vec<NestedTagRequest>>,
}Expand description
WebhookRequest : Adds an owner field for models which have a ForeignKey to users.Owner.
Fields§
§name: String§description: Option<String>§payload_url: StringThis URL will be called using the HTTP method defined when the webhook is called. Jinja2 template processing is supported with the same context as the request body.
http_method: Option<HttpMethod>GET- GET *POST- POST *PUT- PUT *PATCH- PATCH *DELETE- DELETE
http_content_type: Option<String>The complete list of official content types is available here (https://www.iana.org/assignments/media-types/media-types.xhtml).
additional_headers: Option<String>User-supplied HTTP headers to be sent with the request in addition to the HTTP content type. Headers should be defined in the format Name: Value. Jinja2 template processing is supported with the same context as the request body (below).
body_template: Option<String>Jinja2 template for a custom request body. If blank, a JSON object representing the change will be included. Available context data includes: event, model, timestamp, username, request_id, and data.
secret: Option<String>When provided, the request will include a X-Hook-Signature header containing a HMAC hex digest of the payload body using the secret as the key. The secret is not transmitted in the request.
ssl_verification: Option<bool>Enable SSL certificate verification. Disable with caution!
ca_file_path: Option<Option<String>>The specific CA certificate file to use for SSL verification. Leave blank to use the system defaults.
custom_fields: Option<HashMap<String, Value>>§owner: Option<Option<Box<AsnRangeRequestOwner>>>Implementations§
Source§impl WebhookRequest
impl WebhookRequest
Sourcepub fn new(name: String, payload_url: String) -> WebhookRequest
pub fn new(name: String, payload_url: String) -> WebhookRequest
Adds an owner field for models which have a ForeignKey to users.Owner.
Trait Implementations§
Source§impl Clone for WebhookRequest
impl Clone for WebhookRequest
Source§fn clone(&self) -> WebhookRequest
fn clone(&self) -> WebhookRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebhookRequest
impl Debug for WebhookRequest
Source§impl Default for WebhookRequest
impl Default for WebhookRequest
Source§fn default() -> WebhookRequest
fn default() -> WebhookRequest
Source§impl<'de> Deserialize<'de> for WebhookRequest
impl<'de> Deserialize<'de> for WebhookRequest
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>,
Source§impl PartialEq for WebhookRequest
impl PartialEq for WebhookRequest
Source§fn eq(&self, other: &WebhookRequest) -> bool
fn eq(&self, other: &WebhookRequest) -> bool
self and other values to be equal, and is used by ==.