Difference between revisions of "Curl -v"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
  
 +
== Example ==
 +
curl -v http://localhost:8545
 +
*  Trying 127.0.0.1:8545...
 +
* Connected to localhost (127.0.0.1) port 8545 (#0)
 +
> GET / HTTP/1.1
 +
> Host: localhost:8545
 +
> User-Agent: curl/7.85.0
 +
> Accept: */*
 +
>
 +
* Mark bundle as not supporting multiuse
 +
< HTTP/1.1 [[200]] OK
 +
< Date: Mon, 13 Mar 2023 12:59:09 GMT
 +
< Content-Length: 0
 +
<
 +
* Connection #0 to host localhost left intact
  
 +
 +
== Example ==
 
  [[curl]] -v https://google.com
 
  [[curl]] -v https://google.com
  

Revision as of 13:00, 13 March 2023

Example

curl -v http://localhost:8545
*   Trying 127.0.0.1:8545...
* Connected to localhost (127.0.0.1) port 8545 (#0)
> GET / HTTP/1.1
> Host: localhost:8545
> User-Agent: curl/7.85.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Mon, 13 Mar 2023 12:59:09 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact


Example

curl -v https://google.com
*   Trying 172.217.18.110:443...
* Connected to google.com (172.217.18.110) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=*.google.com
*  start date: Aug  1 08:18:00 2022 GMT
*  expire date: Oct 24 08:17:59 2022 GMT
*  subjectAltName: host "google.com" matched cert's "google.com"
*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x141010a00)
> GET / HTTP/2
> Host: google.com
> user-agent: curl/7.79.1
> accept: */*
>
< HTTP/2 301
< location: https://www.google.com/
< content-type: text/html; charset=UTF-8
< date: Wed, 24 Aug 2022 05:08:57 GMT
< expires: Wed, 24 Aug 2022 05:08:57 GMT
< cache-control: private, max-age=2592000
< server: gws
< content-length: 220
< x-xss-protection: 0
< x-frame-options: SAMEORIGIN
< set-cookie: CONSENT=PENDING+732; expires=Fri, 23-Aug-2024 05:08:57 GMT; path=/; domain=.google.com; Secure
< p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
<
<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="https://www.google.com/">here</A>.
</BODY></HTML>
* Connection #0 to host google.com left intact


See also

Advertising: