From 379f9049e4a1a642ff3804bc41445bc1123bb241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Levavasseur?= Date: Fri, 13 Jun 2025 10:41:28 +0200 Subject: [PATCH] Update _utils.py Add usage of headers template https://docs.apify.com/platform/integrations/webhooks/actions#headers-template --- src/apify_client/_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apify_client/_utils.py b/src/apify_client/_utils.py index 0bbc04e8..ad9d390c 100644 --- a/src/apify_client/_utils.py +++ b/src/apify_client/_utils.py @@ -128,6 +128,8 @@ def encode_webhook_list_to_base64(webhooks: list[dict]) -> str: } if 'payload_template' in webhook: webhook_representation['payloadTemplate'] = webhook['payload_template'] + if 'headers_template' in webhook: + webhook_representation['headersTemplate'] = webhook['headers_template'] data.append(webhook_representation) return base64.b64encode(json.dumps(data).encode('utf-8')).decode('ascii')