Making HTTP POST request

前端 未结 3 1529
失恋的感觉
失恋的感觉 2020-12-23 12:10

I\'m trying to make a POST request to retrieve information about a book. Here is the code that returns HTTP code: 302, Moved

import httplib, urllib
params =          


        
3条回答
  •  天涯浪人
    2020-12-23 13:00

    1. Perhaps that's what the browser gets, and you'll just have to follow the 302 redirect.

    2. If all else fails, you can monitor the dialogue between Firefox and the Web Server using FireBug or tcpdump or wireshark, and see which HTTP headers are different. Possibly it's just the User Agent: header.

提交回复
热议问题