![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
米帅232
快乐工作
展开
-
heade头r
User-Agent : 有些服务器或 Proxy 会通过该值来判断是否是浏览器发出的请求 Content-Type : 在使用 REST 接口时,服务器会检查该值,用来确定 HTTP Body 中的内容该怎样解析。 application/xml : 在 XML RPC,如 RESTful/SOAP 调用时使用 application/json : 在 JSON RPC 调用时使用 ap转载 2017-06-21 11:06:28 · 196 阅读 · 0 评论 -
requets
requests 是支持流式上传的,这允许你发送大的数据流或文件而无需先把它们读入内存。要使用流式上传,仅需为你的请求体提供一个类文件对象即可 with open('massive-body') as f: requests.post('http://some.url/streamed', data=f) 1 2 with open('转载 2017-07-14 22:21:26 · 258 阅读 · 0 评论