[quote]
[url]http://www.ruanyifeng.com/blog/2011/09/curl.html[/url]
[/quote]
curl with base auth
curl will form post
curl will customer timeout
curl will header accept
[url]http://www.ruanyifeng.com/blog/2011/09/curl.html[/url]
[/quote]
curl with base auth
curl -H "AUTHORIZATION: Basic <Base64.encode64(user:passwd)>" http://f22.agideo.com
curl will form post
curl -F"token=1234" -F "item_number=322029" -F "_method=put" -F "photo=@/tmp/4444444.JPG" http://localhost:3000/products/upload_photo_by_token
curl will customer timeout
curl --connect-timeout 5 --max-time 5 http://forums.macosxhints.com
curl will header accept
curl -H "Accept:application/json" localhost:3000/bills/1
本文详细介绍了如何利用curl进行HTTP请求操作,包括基本语法、头信息设置、超时控制、请求类型定制及上传文件等高级用法。
19万+

被折叠的 条评论
为什么被折叠?



