Python requests.put() returns error 415

Andrey Tikhov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 20, 2018

So I try to run a super simple code to edit a field in JIRA ticket

import json, requests

r = requests.put(

'http://blablablaserver.com/rest/api/2/issue/ISSUE-3522'
, cookies = {'auth-openid': JIRA_open_ID}
, headers = {'Content-Type':'application/json; charset=utf8'}
, data = json.dumps({"fields":{"assignee":{"name":"ANDREY"}}})

)

Seems to be a super basic sample of field editing.

However I keep getting <Response 415> .

Literaly struggling what the hell is going on.

All other ticket creation/searches etc work perfectly with cookies and headers above.

P.S. please do not offer to use jira python library, want to understand what's going wrong in this particular case.

1 answer

1 accepted

1 vote
Answer accepted
Andrey Tikhov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 20, 2018

Ok. Consider me an idiot and close this one :)

Answer is http vs. https

Suggest an answer

Log in or Sign up to answer