SORU
15 Temmuz 2010, PERŞEMBE


Nasıl komut satırı curl ile istek başlıklarını görüntülemek için

Komut satırı -D seçeneğini kullanarak cevap başlık görüntüleyebilir curl, ama göndermek ne olduğunu görmek istiyorum. Bunu nasıl yapabilirim?

CEVAP
15 Temmuz 2010, PERŞEMBE


curl -v --verbose seçeneği HTTP istek başlıklarını, diğer şeyler arasında gösterir. İşte bazı örnek çıktı:

$ curl -v http://google.com/
* About to connect() to google.com port 80 (#0)
*   Trying 66.102.7.104... connected
* Connected to google.com (66.102.7.104) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.16.4 (i386-apple-darwin9.0) libcurl/7.16.4 OpenSSL/0.9.7l zlib/1.2.3
> Host: google.com
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Location: http://www.google.com/
< Content-Type: text/html; charset=UTF-8
< Date: Thu, 15 Jul 2010 06:06:52 GMT
< Expires: Sat, 14 Aug 2010 06:06:52 GMT
< Cache-Control: public, max-age=2592000
< Server: gws
< Content-Length: 219
< X-XSS-Protection: 1; mode=block
< 
<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.com/">here</A>.
</BODY></HTML>
* Connection #0 to host google.com left intact
* Closing connection #0

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Flash CS6 Video Tutorials for Beginners (Actionscript 3 Gaming)

    Flash CS6 Vi

    14 EYLÜL 2012
  • hotstrikegently

    hotstrikegen

    26 AĞUSTOS 2011
  • HuskyStarcraft

    HuskyStarcra

    4 HAZİRAN 2009