「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

外部連結