0

I am trying to make a post call to IPv6 server using python-requests module on linux. This gives me a 502 Bad Gateway error.

Here are the details of the versions:

  • Python version: 2.7
  • Requests module version: 2.22

But I have tried to make the same request from a windows machine(using requests 2.21), and the request is successful.

payload = {
            'username' : "abc",
            'password' : "xxxx"
            }

response = requests.post('https://[2606:b400:605:b857::489]/xyz/auth/tokens',  data=payload, verify=False)
print response

I get a 502 Bad Gateway Response Code

1 Answers1

-1

This is probably because you didn't add headers required to make a request. Sometimes the request may accept only specific Content-Type

Try capturing the request and have a look to find out what's the issue.

Salman Farsi
  • 466
  • 3
  • 13