python-pipedrive icon indicating copy to clipboard operation
python-pipedrive copied to clipboard

leads endpoint only allows json content

Open wesselvdrest opened this issue 4 years ago • 0 comments

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.

wesselvdrest avatar Mar 17 '21 10:03 wesselvdrest