The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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