8000 support user-defined headers · brumar/wc-api-python@7824e44 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7824e44

Browse files
committed
support user-defined headers
1 parent dee5065 commit 7824e44

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

woocommerce/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def __request(self, method, endpoint, data, params=None, **kwargs):
7474
"user-agent": "WooCommerce API Client-Python/%s" % __version__,
7575
"accept": "application/json"
7676
}
77+
new_headers = kwargs.pop("headers", {})
78+
headers.update(new_headers)
7779

7880
if self.is_ssl is True and self.query_string_auth is False:
7981
auth = (self.consumer_key, self.consumer_secret)

0 commit comments

Comments
 (0)
0