crl = pycurl.Curl()
...若干设置
crl.fp.getvalue()
getvalue结果如下
* Trying ...
* Connected to beta.com port 8081 (#0)
> GET /charge?id=112 HTTP/1.1
Host: beta.com:8081
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36
Accept: */*
{"code":"-11","data":"null"}
< HTTP/1.1 200 OK
< Date: Wed, 12 Jul 2017 06:50:37 GMT
< Server: Apache/2.4.9 (Unix) PHP/5.5.11 OpenSSL/1.0.1g
< X-Powered-By: PHP/5.5.11
< Content-Length: 28
< Content-Type: application/json;charset=utf-8
<
* Connection #0 to host beta.com left intact
requests不好用吗?