Hello
I am trying to login to Jira within python program and I get 405 error. Here is my code:
import httplib
import urllib
import json
conn = httplib.HTTPConnection("myjira:2002")
args = urllib.urlencode({'username':'myuser', 'password':'mypassword'})
headers = {'accept':'application/json'}
r1 = conn.request("post","/rest/auth/1/session",args, headers)
# --- Authenticate to jira ----------------
r2 = conn.getresponse()
print r1,r2.status,r2.reason,r2
The result I get
None 405 <httplib.HTTPResponse instance at 0x7fc1815b10e0>
Process finished with exit code 0
Can you please let me know why this code does not work.
I am using Jira 7.4.4
Thanks
Abe
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.