python-pipedrive
python-pipedrive copied to clipboard
leads endpoint only allows json content
see changelog
to fix this a POST_JSON method could be added to thee _request definition!:
...
elif method == "POST_JSON":
uri = PIPEDRIVE_API_URL + endpoint + '?api_token=' + str(self.api_token)
response, data = self.http.request(uri, method="POST", body=json.dumps(data), headers={'Content-Type': 'application/json'})
...
This is also the case for PATCH but I'm not using that method.