0

I been stuck on this for past few hours. Can't figure this out. I tested this out on postman and it works fine. But in python, I kept getting 405 requests.

Raw API request

OPTIONS /sessions HTTP/1.1
Host: elb.deposit.shopifycs.com
Access-Control-Request-Method: POST
Origin: https://checkout.shopifycs.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Access-Control-Request-Headers: content-type
Accept: */*
Referer:
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

url = 'https://elb.deposit.shopifycs.com/'
resp = session.options(url, headers = Headers)
print resp.status_code, ' status'
Av0id
  • 33
  • 11

1 Answers1

1

Just for the record the answer was to use the correct URL.

url = 'https://elb.deposit.shopifycs.com/sessions'

(I hope posting an answer will prevent other people from spending too much time looking at it)

Dan-Dev
  • 8,957
  • 3
  • 38
  • 55