且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过HTTP发送二进制数据后?

更新时间:2022-05-18 03:24:24

或者

req = urllib2.Request("http://example.com", data, {'Content-Type': 'application/octet-stream'})
urllib2.urlopen(req)

这也显示了如何指定数据的内容类型。

That also shows how you can specify the Content-Type of the data.