mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add http_method field to Webhook
This commit is contained in:
@@ -43,13 +43,15 @@ def process_webhook(webhook, data, model_name, event, timestamp, username, reque
|
||||
|
||||
# Prepare the HTTP request
|
||||
params = {
|
||||
'method': 'POST',
|
||||
'method': webhook.http_method,
|
||||
'url': webhook.payload_url,
|
||||
'headers': headers,
|
||||
'data': body,
|
||||
}
|
||||
logger.info(
|
||||
"Sending webhook to {}: {} {}".format(params['url'], context['model'], context['event'])
|
||||
"Sending {} request to {} ({} {})".format(
|
||||
params['method'], params['url'], context['model'], context['event']
|
||||
)
|
||||
)
|
||||
logger.debug(params)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user