I am logging into website by using below code...
payload = {'user': 'apple', 'password': 'banana'}
loginurl = 'http://12.345.678.910:8000/login'
r = requests.post(loginurl, data=payload)
data = r.json()
print(data)
As a response of above code i am getting output as below
{u'message': u'Logged in'}
Now in that website i am trying to get some response by using below get request...
DataURL = "http://12.345.678.910:8000/api/datasources/proxy/1/query?db=AB_CDE&q=SELECT%20sum(%22count%22)%20FROM%20%22gatling%22%20WHERE%20%22status%22%20%3D%20%27ok%27%20AND%20%22simulation%22%20%3D~%20%2Fabdokd-live*%2F%20AND%20time%20%3E%201544491800000ms%20and%20time%20%3C%201544495400000ms%20GROUP%20BY%20%22script%22&epoch=ms"
Datar = requests.get(url = DataURL)
resposne = Datar.json()
print(resposne)
As a response of above code i am getting below...
{u'message': u'Unauthorized'}
Which is not expected as in the previous step i already logged into the website. Can someone help me to correct my code?