Skip to content

Instantly share code, notes, and snippets.

@simics-ja
Created June 23, 2021 01:27
Show Gist options
  • Save simics-ja/5e1498c31e396986b5e4b6d98883b4b3 to your computer and use it in GitHub Desktop.
Save simics-ja/5e1498c31e396986b5e4b6d98883b4b3 to your computer and use it in GitHub Desktop.
[curl] #shell # curl

リクエスト内容も表示する

-vオプションをつける

$ curl -v google.co.jp                                            
*   Trying 172.217.175.99...
* TCP_NODELAY set
* Connected to google.co.jp (172.217.175.99) port 80 (#0)
> GET / HTTP/1.1
> Host: google.co.jp
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Location: http://www.google.co.jp/
< Content-Type: text/html; charset=UTF-8
< Date: Wed, 23 Jun 2021 01:25:57 GMT
< Expires: Fri, 23 Jul 2021 01:25:57 GMT
< Cache-Control: public, max-age=2592000
< Server: gws
< Content-Length: 221
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
<
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.co.jp/">here</A>.
</BODY></HTML>
* Connection #0 to host google.co.jp left intact
* Closing connection 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment