Skip to content

Commit 5b5c58a

Browse files
Add Content-Type header to the Get Store Insights API request
1 parent ec65fca commit 5b5c58a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ad_api/api/stores.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ def get_insights_for_store_api(self, brandEntityId, version: int = 1, **kwargs)
2323
"""
2424
content_type = 'application/vnd.GetInsightsForStoreRequest.v'+ str(version) +'+json'
2525
# accept = 'application/vnd.GetInsightsForStoreResponse.v'+ str(version) +'+json'
26-
# headers = {'Content-Type': content_type, 'Accept': accept}
27-
return self._request(fill_query_params(kwargs.pop('path'), brandEntityId),
28-
data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
29-
# return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
26+
headers = {
27+
'Content-Type': content_type,
28+
# 'Accept': accept,
29+
}
30+
# return self._request(fill_query_params(kwargs.pop('path'), brandEntityId),
31+
# data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
32+
return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
3033

3134

3235

0 commit comments

Comments
 (0)