Curl:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
无编辑摘要
第7行: 第7行:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
curl -v --proxy https://username:password@proxy.example.com:4128/ https://httpbin.org/ip
curl -v --proxy https://username:password@proxy.example.com:4128/ https://httpbin.org/anything
</syntaxhighlight>
 
指定referer可以用<code>-X</code>:
 
<syntaxhighlight lang="bash">
curl -v -H "Referer: https://www.example.com/" https://httpbin.org/anything
</syntaxhighlight>
</syntaxhighlight>



2024年3月11日 (一) 07:03的版本

curl是一套工具,包括library以及command line tool。

範例

指定proxy可以用--proxy並且包含proxy需要的帳號密碼:

curl -v --proxy https://username:password@proxy.example.com:4128/ https://httpbin.org/anything

指定referer可以用-X

curl -v -H "Referer: https://www.example.com/" https://httpbin.org/anything

外部連結