From 7824e4410dca6950326fbd9d62ae9cfa4a886c72 Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 21 Jan 2019 11:11:05 +0100 Subject: [PATCH] support user-defined headers --- woocommerce/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/woocommerce/api.py b/woocommerce/api.py index da81e81..4a0ca37 100644 --- a/woocommerce/api.py +++ b/woocommerce/api.py @@ -74,6 +74,8 @@ def __request(self, method, endpoint, data, params=None, **kwargs): "user-agent": "WooCommerce API Client-Python/%s" % __version__, "accept": "application/json" } + new_headers = kwargs.pop("headers", {}) + headers.update(new_headers) if self.is_ssl is True and self.query_string_auth is False: auth = (self.consumer_key, self.consumer_secret) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy