Skip to content

Commit b181f51

Browse files
dimon222lresende
authored andcommitted
Properly set Content-Type in PUT requests (#26)
1 parent d3a7b65 commit b181f51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

yarn_api_client/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def update(self, api_path, data):
5454
response = None
5555
if self.kerberos_enabled:
5656
from requests_kerberos import HTTPKerberosAuth
57-
response = requests.put(api_endpoint, data=data, auth=HTTPKerberosAuth())
57+
response = requests.put(api_endpoint, data=data, auth=HTTPKerberosAuth(), headers={"Content-Type":"application/json"})
5858
else:
59-
response = requests.put(api_endpoint, data=data)
59+
response = requests.put(api_endpoint, data=data, headers={"Content-Type":"application/json"})
6060

6161
if response.status_code == requests.codes.ok:
6262
return self.response_class(response)

0 commit comments

Comments
 (0)