Python Requests POST doing a GET?

前端 未结 2 609
南方客
南方客 2021-01-04 01:28

I am using Python 2.7.5, Django 1.7, requests 2.4.1, and doing some simple testing. However, it seems like when I call requests.post, the method is doing a GET instead.

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-04 01:46

    Thanks to Martijn for some debugging tips! The problem was the RESTful API was redirecting me from http:// to https://, which caused the library to return the "second" request (GET)...

提交回复
热议问题