Command Line 的 HTTP 操作工具

忘記在哪邊翻到的:「HTTP Tools Roundup」,裡面有提到一些 Command Line 下操作 HTTP 內容的工具。

其中一個是 HTTPie,這個有時後會拿來用,不過大多數的時候還是習慣用 curl 了 (因為 curl 幾乎都會裝,HTTPie 要另外裝):

另外一個是 http-console,這是第一次看到... 用過後覺得還不錯,應該會記起來用一陣子看看 XD

gslin@home [~] [17:24/W5] http-console --ssl https://emma.pixnet.cc:443/
> http-console 0.6.4
> Welcome, enter .help if you're lost.
> Connecting to emma.pixnet.cc on port 443.

https://emma.pixnet.cc:443/> GET /robots.txt
HTTP/1.1 200 OK
Date: Sat, 11 Nov 2017 09:24:11 GMT
Last-Modified: Tue, 16 Sep 2014 06:45:02 GMT
Etag: "2b-50329173d7780"
Accept-Ranges: bytes
Content-Length: 43
Vary: Accept-Encoding,User-Agent
P3p: CP="CURa ADMa DEVa PSAo PSDo OUR IND UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"
X-Farmid: ba2629de4a01c1a81a0ad72ff1f11c5d2ae5ed0782561f591105c5a669e4ea49
Access-Control-Allow-Origin: *
Connection: close
Content-Type: text/plain

# emma.pixnet.cc
User-agent: *
Disallow: /
https://emma.pixnet.cc:443/>

然後再下 GET /glossary/twzipcode 又可以拉出其他東西。

One thought on “Command Line 的 HTTP 操作工具”

Leave a Reply

Your email address will not be published. Required fields are marked *