SlideShare a Scribd company logo
cURL

                  ( )




2011-09-12(   )
curl
                    - transfer a URL
                  • curl is a tool to transfer data from
                    or to a server, using one of the
                    supported protocols (DICT, FILE,
                    FTP, FTPS, GOPHER, HTTP,
                    HTTPS, IMAP, IMAPS, LDAP,
                    LDAPS, POP3, POP3S, RTMP, RTSP,
                    SCP, SFTP, SMTP, SMTPS, TELNET
                    and TFTP).


2011-09-12(   )
why cURL is useful?




                  • curl -O http://example.com/
                   wallpapers/img[01-19].jpg

2011-09-12(   )
why cURL is useful
                  for Web Developers




2011-09-12(   )
HTTP

              $ telnet www.google.co.jp 80
              Trying 74.125.153.105...
              Connected to www.l.google.com.
              Escape character is '^]'.

              GET / HTTP/1.1
              Host: www.google.co.jp

              <   >


2011-09-12(   )
GET / HTTP/1.1


         [method] [request-uri] HTTP/1.1




2011-09-12(   )
2011-09-12(   )
Host: www.google.co.jp


                   Host: <   >




2011-09-12(   )
HTTP

              $ telnet www.google.co.jp 80
              Trying 74.125.153.105...
              Connected to www.l.google.com.
              Escape character is '^]'.

              GET / HTTP/1.1
              Host: www.google.co.jp

              <   >


2011-09-12(   )
curl
              $ curl -v http://www.google.co.jp
              * About to connect() to www.google.co.jp port 80
              (#0)
              *    Trying 74.125.153.106... connected*
              Connected to www.google.co.jp (74.125.153.106)
              port 80 (#0)
              > GET / HTTP/1.1
              > User-Agent: curl/7.21.7 ...
              > Host: www.google.co.jp
              > Accept: */*
              >
              < HTTP/1.1 200 OK
              < Date: Thu, 08 Sep 2011 06:47:44 GMT
              < Expires: -1
              < Cache-Control: private, max-age=0

2011-09-12(   )
curl --head
                     curl --verbose|-v

                  (curl --trace-ascii dump)



2011-09-12(   )
HTTP Header

              $ curl -v http://www.google.co.jp
              *   (ry)
              >   GET / HTTP/1.1
              >   User-Agent: curl/7.21.7 ...
              >   Host: www.google.co.jp
              >   Accept: */*
              >
              <   HTTP/1.1 200 OK
              <   Date: Thu, 08 Sep 2011 06:47:44 GMT
              <   Expires: -1
              <   Cache-Control: private, max-age=0




2011-09-12(   )
HTTP Request Headers
                  Accept

                  Accept-Language

                  Authorization

                  Host

                  Referer

                  User-Agent


2011-09-12(   )
$ curl -v -H 'Accept-Language: ja'
                 http://twitter.com |
                nokogrep -a content 'meta[name=description]'

              > GET / HTTP/1.1
              > User-Agent: curl/7.21.7
              > Host: twitter.com
              > Accept: */*
              > Accept-Language: ja
              >
              < HTTP/1.1 200 OK
              ...




2011-09-12(   )
$ curl -v -H 'Accept-Language: en'
                 http://twitter.com |
                nokogrep -a content 'meta[name=description]'

              > GET / HTTP/1.1
              > User-Agent: curl/7.21.7
              > Host: twitter.com
              > Accept: */*
              > Accept-Language: en
              >
              < HTTP/1.1 200 OK
              ...

              Instantly connect to what's most important to
              you. Follow your friends, experts, favorite
              celebrities, and breaking news.



2011-09-12(   )
$ curl -v 
                     -H 'Accept: application/json' 
                     http://jobs.dev/jobs | 
               ruby -rpp -rjson -e 'pp JSON.parse(STDIN.read)'

              >   GET /jobs HTTP/1.1
              >   User-Agent: curl/7.21.7
              >   Host: jobs.dev
              >   Accept: application/json




2011-09-12(   )
< HTTP/1.1 200 OK
              < Content-Type: application/json; charset=utf-8
              < X-UA-Compatible: IE=Edge
              < ETag: "1490b2d47b09a5abb92bd7eb09c4c51e"
              < Cache-Control:
                 max-age=0, private, must-revalidate
              < X-Runtime: 0.059816
              < Connection: keep-alive
              < Transfer-Encoding: chunked

              [{"created_at"=>"2011-09-07T05:56:22Z",
                "deadline"=>"2011-09-07",
                "description"=>"               !!!",
                  "id"=>1,
                  "public"=>true,
                  "title"=>"10         ",
                  "updated_at"=>"2011-09-07T09:59:33Z"}]


2011-09-12(   )
HTTP Response
              HTTP/1.1 200 OK
              Date: Mon, 12 Sep 2011 01:27:34 GMT
              Server: hi
              Status: 200 OK
              ETag: "ceedd0ac4f0339411aab820e225afcdf"
              Content-Type: text/html; charset=utf-8
              Content-Length: 44188
              Pragma: no-cache
              Expires: Tue, 31 Mar 1981 05:00:00 GMT
              Cache-Control: no-cache, no-store, must-
                 revalidate, pre-check=0, post-check=0
              X-XSS-Protection: 1; mode=block

2011-09-12(   )
HTTP Response
              HTTP/1.1 200 OK
              Date: Mon, 12 Sep 2011 01:27:34 GMT
              Server: hi
              Status: 200 OK
              ETag: "ceedd0ac4f0339411aab820e225afcdf"
              Content-Type: text/html; charset=utf-8
              Content-Length: 44188
              Pragma: no-cache
              Expires: Tue, 31 Mar 1981 05:00:00 GMT
              Cache-Control: no-cache, no-store, must-
                 revalidate, pre-check=0, post-check=0
              X-XSS-Protection: 1; mode=block

2011-09-12(   )
Status line
                  200

                  302

                  400

                  404

                  500

                  503


2011-09-12(   )
HTTP Status is app UI



                   200

                                   404 ?

                   410(Gone)


2011-09-12(   )
HTTP Response Headers
                   Location

                   Server



                   Content-Type

                   Content-Length



                   Expire, ETag, Cache-Control


2011-09-12(   )
curl --data|-d




2011-09-12(   )
POST via curl
      $ curl -v
             -d email=moro@example.jp 
             -d password=hogehoge 
             http://example.com/users

      POST /users HTTP/1.1
      User-Agent: curl/7.21.7
      Host: example.com
      Accept: */*
      Content-Length: 36
      Content-Type:
             application/x-www-form-urlencoded

2011-09-12(   )
HTTP/1.1 201 Created
  Content-Type: application/json
  Date: Mon, 12 Sep 2011 01:43:41 GMT
  Server: journey/0.4.0
  Content-Length: 71
  Connection: keep-alive

  {"email":"moro@example.jp","_id":"4e6d63cd981
  5710100000005","profiles":[]}



2011-09-12(   )
curl --user|-u




2011-09-12(   )
HTTP Authentication

      $ curl -v
             -u moro@example.jp:hogehoge 
             http://example.com/account

      GET /account HTTP/1.1
      Authorization:
          Basic bW9yb0BleGFtcGxlLmpwOmhvZ2Vob2dl
      User-Agent: curl/7.21.7
      Host: example.com
      Accept: */*



2011-09-12(   )
HTTP Authentication

      HTTP/1.1 200 OK
      Content-Type: application/json
      Date: Mon, 12 Sep 2011 01:51:00 GMT
      Server: journey/0.4.0
      Content-Length: 71
      Connection: keep-alive

      {"email":"moro@example.jp","_id":"4e6d63cd9
      815710100000005","profiles":[]}



2011-09-12(   )
cookie
                    &
                   cURL
                    http://flic.kr/p/5ekGdX
2011-09-12(   )
cookie

                  • HTTP              {Cookie}
                                  Web




                       http://www.studyinghttp.net/cookies
2011-09-12(   )
[res] Set-Cookie
                      [req] Cookie


                  • Netscape
                       Set-Cookie      Cookie          2
                    HTTP




                        http://www.studyinghttp.net/cookies#HeadersForCookie

2011-09-12(   )
2011-09-12(   )
2011-09-12(   )
curl --cookie|-b




2011-09-12(   )
without cookie


      $ curl -q http://jobs.dev |
        nokogrep '#header p.greeting'

                  Who are you?
                  Sign in




2011-09-12(   )
Cookie & cURL
      $ curl -v
             -b '_jobs_session=BAh7CEkiD3Nl(      )'
                    http://jobs.dev |
              nokogrep '#header p.greeting'

      GET / HTTP/1.1
      User-Agent: curl/7.21.7
      Host: jobs.dev
      Accept: */*
      Cookie: _jobs_session=BAh7CEkiD3Nl(     )


2011-09-12(   )
Cookie & cURL
      HTTP/1.1 200 OK
      Content-Type: text/html; charset=utf-8
      X-UA-Compatible: IE=Edge
      ETag: "8c0c63144925e4cc29b655906c221a3f"
      Set-Cookie:_jobs_session=BAh7CEkiD3Nl( )
      X-Runtime: 0.156343
      Connection: keep-alive
      Transfer-Encoding: chunked

                  Hi moro@example.jp
                  Sign out


2011-09-12(   )
2011-09-12(   )
$ curl -v 
                     -d 'user[email]=moro@example.jp'
                     -d 'user[password]=hogehoge'
                   http://jobs.dev/users/sign_in

              POST /users/sign_in HTTP/1.1
              User-Agent: curl/7.21.7
              Host: jobs.dev
              Accept: */*
              Content-Length: 51
              Content-Type:
                    application/x-www-form-urlencoded




2011-09-12(   )
HTTP/1.1 302 Moved Temporarily
              Location: http://jobs.dev/
              Content-Type: text/html; charset=utf-8
              X-UA-Compatible: IE=Edge
              Cache-Control: no-cache
              Set-Cookie: _jobs_session=BAh7CE( )
              X-Runtime: 0.217055
              Connection: keep-alive
              Transfer-Encoding: chunked

              <html><body>You are being <a
              href="http://jobs.dev/">redirected</
              a>.</body></html>




2011-09-12(   )
$ curl -v 
                     -b '_jobs_session=BAh7CE(    )'
                    http://jobs.dev/ |
                  nokogrep '#header p.greeting'

              GET / HTTP/1.1
              User-Agent: curl/7.21.7
              Host: jobs.dev
              Accept: */*
              Cookie: _jobs_session=BAh7CE(   )




2011-09-12(   )
HTTP/1.1 200 OK
              Content-Type: text/html; charset=utf-8
              X-UA-Compatible: IE=Edge
              ETag: "98d16875bdceb8c5451e7706e6071ece"
              Cache-Control:
                 max-age=0, private, must-revalidate
              Set-Cookie: _jobs_session=BAh7CUki( )
              X-Runtime: 0.193951
              Connection: keep-alive
              Transfer-Encoding: chunked

                      Hi moro@example.jp
                      Sign out


2011-09-12(   )
2011-09-12(   )
see also

                  • http://www.studyinghttp.net/
                  • http://www.studyinghttp.net/
                   rfc_ja/rfc2616
                  • http://amazon.jp/dp/
                   4774142042/morodiary05-22/
                   ref=nosim/



2011-09-12(   )

More Related Content

What's hot

HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?
Alessandro Nadalin
 
Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP Apis
Adrian Cole
 
Socket programming with php
Socket programming with phpSocket programming with php
Socket programming with phpElizabeth Smith
 
LogStash - Yes, logging can be awesome
LogStash - Yes, logging can be awesomeLogStash - Yes, logging can be awesome
LogStash - Yes, logging can be awesome
James Turnbull
 
mod_perl 2.0 For Speed Freaks!
mod_perl 2.0 For Speed Freaks!mod_perl 2.0 For Speed Freaks!
mod_perl 2.0 For Speed Freaks!
Philippe M. Chiasson
 
HTTP Caching in Web Application
HTTP Caching in Web ApplicationHTTP Caching in Web Application
HTTP Caching in Web Application
Martins Sipenko
 
Varnish Cache and Django (Falcon, Flask etc)
Varnish Cache and Django (Falcon, Flask etc)Varnish Cache and Django (Falcon, Flask etc)
Varnish Cache and Django (Falcon, Flask etc)
Данил Иванов
 
tdc2012
tdc2012tdc2012
tdc2012
Juan Lopes
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
Adrian Cole
 
HTTP 완벽가이드- 13 다이제스트 인증
HTTP 완벽가이드- 13 다이제스트 인증HTTP 완벽가이드- 13 다이제스트 인증
HTTP 완벽가이드- 13 다이제스트 인증
박 민규
 
Ethernet Shield
Ethernet ShieldEthernet Shield
Ethernet Shield
Tinker
 
Restfs internals
Restfs internalsRestfs internals
Restfs internals
Manfred Furuholmen
 
Realtime Communication Techniques with PHP
Realtime Communication Techniques with PHPRealtime Communication Techniques with PHP
Realtime Communication Techniques with PHPWaterSpout
 
Node.js - A Quick Tour II
Node.js - A Quick Tour IINode.js - A Quick Tour II
Node.js - A Quick Tour II
Felix Geisendörfer
 
Scrip queue tree
Scrip queue treeScrip queue tree
Scrip queue treeMarco Arias
 
Http capturing
Http capturingHttp capturing
Http capturing
Eric Ahn
 
Puppet
PuppetPuppet
DEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacksDEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacks
Felipe Prado
 
Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyPeter Keung
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
Gleicon Moraes
 

What's hot (20)

HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?
 
Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP Apis
 
Socket programming with php
Socket programming with phpSocket programming with php
Socket programming with php
 
LogStash - Yes, logging can be awesome
LogStash - Yes, logging can be awesomeLogStash - Yes, logging can be awesome
LogStash - Yes, logging can be awesome
 
mod_perl 2.0 For Speed Freaks!
mod_perl 2.0 For Speed Freaks!mod_perl 2.0 For Speed Freaks!
mod_perl 2.0 For Speed Freaks!
 
HTTP Caching in Web Application
HTTP Caching in Web ApplicationHTTP Caching in Web Application
HTTP Caching in Web Application
 
Varnish Cache and Django (Falcon, Flask etc)
Varnish Cache and Django (Falcon, Flask etc)Varnish Cache and Django (Falcon, Flask etc)
Varnish Cache and Django (Falcon, Flask etc)
 
tdc2012
tdc2012tdc2012
tdc2012
 
I got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't oneI got 99 problems, but ReST ain't one
I got 99 problems, but ReST ain't one
 
HTTP 완벽가이드- 13 다이제스트 인증
HTTP 완벽가이드- 13 다이제스트 인증HTTP 완벽가이드- 13 다이제스트 인증
HTTP 완벽가이드- 13 다이제스트 인증
 
Ethernet Shield
Ethernet ShieldEthernet Shield
Ethernet Shield
 
Restfs internals
Restfs internalsRestfs internals
Restfs internals
 
Realtime Communication Techniques with PHP
Realtime Communication Techniques with PHPRealtime Communication Techniques with PHP
Realtime Communication Techniques with PHP
 
Node.js - A Quick Tour II
Node.js - A Quick Tour IINode.js - A Quick Tour II
Node.js - A Quick Tour II
 
Scrip queue tree
Scrip queue treeScrip queue tree
Scrip queue tree
 
Http capturing
Http capturingHttp capturing
Http capturing
 
Puppet
PuppetPuppet
Puppet
 
DEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacksDEF CON 27- ALBINOWAX - http desync attacks
DEF CON 27- ALBINOWAX - http desync attacks
 
Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites fly
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 

Viewers also liked

curl and new technologies
curl and new technologiescurl and new technologies
curl and new technologies
Daniel Stenberg
 
Internet all the things - curl everywhere!
Internet all the things - curl everywhere!Internet all the things - curl everywhere!
Internet all the things - curl everywhere!
Daniel Stenberg
 
HTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmHTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks Stockholm
Daniel Stenberg
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
Daniel Stenberg
 
주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법guestad13b55
 
Docker Architecture (v1.3)
Docker Architecture (v1.3)Docker Architecture (v1.3)
Docker Architecture (v1.3)
rajdeep
 

Viewers also liked (6)

curl and new technologies
curl and new technologiescurl and new technologies
curl and new technologies
 
Internet all the things - curl everywhere!
Internet all the things - curl everywhere!Internet all the things - curl everywhere!
Internet all the things - curl everywhere!
 
HTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmHTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks Stockholm
 
Http2 right now
Http2 right nowHttp2 right now
Http2 right now
 
주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법
 
Docker Architecture (v1.3)
Docker Architecture (v1.3)Docker Architecture (v1.3)
Docker Architecture (v1.3)
 

Similar to Introduction HTTP via cURL

HTTP
HTTPHTTP
REST and JAX-RS
REST and JAX-RSREST and JAX-RS
REST and JAX-RS
Guy Nir
 
Rpi python web
Rpi python webRpi python web
Rpi python web
sewoo lee
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
Andrii Bezruchko
 
Basic testing with selenium
Basic testing with seleniumBasic testing with selenium
Basic testing with selenium
Søren Lund
 
Server architecture
Server architectureServer architecture
Server architecture
Masters Academy
 
Ethernet Shield
Ethernet ShieldEthernet Shield
Ethernet Shield
Tinker London
 
REST Web Sebvice
REST Web SebviceREST Web Sebvice
REST Web Sebvicekhmerforge
 
Cache is king
Cache is kingCache is king
Cache is king
edrone
 
Cache is the king
Cache is the kingCache is the king
Cache is the king
Kasia Przybylska
 
OWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and Ave
OWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and AveOWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and Ave
OWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and Ave
Checkmarx
 
Web Application Security 101 - 02 The Basics
Web Application Security 101 - 02 The BasicsWeb Application Security 101 - 02 The Basics
Web Application Security 101 - 02 The Basics
Websecurify
 
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeBig Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
JAX London
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?timbc
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your Apps
Ben Ramsey
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
Ben Ramsey
 
Bootstrapping multidc observability stack
Bootstrapping multidc observability stackBootstrapping multidc observability stack
Bootstrapping multidc observability stack
Bram Vogelaar
 
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc  2015 HTTP 1, HTTP 2 and folksDevoxx Maroc  2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Nicolas Martignole
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
Mario Cardinal
 

Similar to Introduction HTTP via cURL (20)

HTTP
HTTPHTTP
HTTP
 
REST and JAX-RS
REST and JAX-RSREST and JAX-RS
REST and JAX-RS
 
Rpi python web
Rpi python webRpi python web
Rpi python web
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Basic testing with selenium
Basic testing with seleniumBasic testing with selenium
Basic testing with selenium
 
Server architecture
Server architectureServer architecture
Server architecture
 
Ethernet Shield
Ethernet ShieldEthernet Shield
Ethernet Shield
 
Web tech 101
Web tech 101Web tech 101
Web tech 101
 
REST Web Sebvice
REST Web SebviceREST Web Sebvice
REST Web Sebvice
 
Cache is king
Cache is kingCache is king
Cache is king
 
Cache is the king
Cache is the kingCache is the king
Cache is the king
 
OWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and Ave
OWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and AveOWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and Ave
OWASP Top 10 - Checkmarx Presentation at Polytechnic Institute of Cávado and Ave
 
Web Application Security 101 - 02 The Basics
Web Application Security 101 - 02 The BasicsWeb Application Security 101 - 02 The Basics
Web Application Security 101 - 02 The Basics
 
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian ColeBig Data & Cloud | Cloud Storage Simplified | Adrian Cole
Big Data & Cloud | Cloud Storage Simplified | Adrian Cole
 
Interactive web. O rly?
Interactive web. O rly?Interactive web. O rly?
Interactive web. O rly?
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your Apps
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
 
Bootstrapping multidc observability stack
Bootstrapping multidc observability stackBootstrapping multidc observability stack
Bootstrapping multidc observability stack
 
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc  2015 HTTP 1, HTTP 2 and folksDevoxx Maroc  2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
 
HTTP fundamentals for developers
HTTP fundamentals for developersHTTP fundamentals for developers
HTTP fundamentals for developers
 

More from Kyosuke MOROHASHI

Ruby ecosystem applied to agile project
Ruby ecosystem applied to agile projectRuby ecosystem applied to agile project
Ruby ecosystem applied to agile project
Kyosuke MOROHASHI
 
Test Context Arrangement Recipebook
Test Context Arrangement RecipebookTest Context Arrangement Recipebook
Test Context Arrangement RecipebookKyosuke MOROHASHI
 
Begin cucumber-in-real-world
Begin cucumber-in-real-worldBegin cucumber-in-real-world
Begin cucumber-in-real-world
Kyosuke MOROHASHI
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
Kyosuke MOROHASHI
 
Rails testing environment, 2009 fall
Rails testing environment, 2009 fallRails testing environment, 2009 fall
Rails testing environment, 2009 fall
Kyosuke MOROHASHI
 
TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"
Kyosuke MOROHASHI
 
OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京
Kyosuke MOROHASHI
 
Capistrano in practice - WebCareer
Capistrano in practice - WebCareerCapistrano in practice - WebCareer
Capistrano in practice - WebCareer
Kyosuke MOROHASHI
 
named_scope more detail - WebCareer
named_scope more detail - WebCareernamed_scope more detail - WebCareer
named_scope more detail - WebCareer
Kyosuke MOROHASHI
 
named_scope more detail
named_scope more detailnamed_scope more detail
named_scope more detail
Kyosuke MOROHASHI
 
Rails <form> Chronicle
Rails <form> ChronicleRails <form> Chronicle
Rails <form> Chronicle
Kyosuke MOROHASHI
 
そうだ勉強会に行こう
そうだ勉強会に行こうそうだ勉強会に行こう
そうだ勉強会に行こう
Kyosuke MOROHASHI
 

More from Kyosuke MOROHASHI (13)

Ruby ecosystem applied to agile project
Ruby ecosystem applied to agile projectRuby ecosystem applied to agile project
Ruby ecosystem applied to agile project
 
Test Context Arrangement Recipebook
Test Context Arrangement RecipebookTest Context Arrangement Recipebook
Test Context Arrangement Recipebook
 
Begin cucumber-in-real-world
Begin cucumber-in-real-worldBegin cucumber-in-real-world
Begin cucumber-in-real-world
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
Rails testing environment, 2009 fall
Rails testing environment, 2009 fallRails testing environment, 2009 fall
Rails testing environment, 2009 fall
 
TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"TDD frameworks let me dream "Project Specific Language"
TDD frameworks let me dream "Project Specific Language"
 
Rails Tokyo 035 Cucumber
Rails Tokyo 035 CucumberRails Tokyo 035 Cucumber
Rails Tokyo 035 Cucumber
 
OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京OSC2008 勉強会大集合 Rails勉強会@東京
OSC2008 勉強会大集合 Rails勉強会@東京
 
Capistrano in practice - WebCareer
Capistrano in practice - WebCareerCapistrano in practice - WebCareer
Capistrano in practice - WebCareer
 
named_scope more detail - WebCareer
named_scope more detail - WebCareernamed_scope more detail - WebCareer
named_scope more detail - WebCareer
 
named_scope more detail
named_scope more detailnamed_scope more detail
named_scope more detail
 
Rails <form> Chronicle
Rails <form> ChronicleRails <form> Chronicle
Rails <form> Chronicle
 
そうだ勉強会に行こう
そうだ勉強会に行こうそうだ勉強会に行こう
そうだ勉強会に行こう
 

Recently uploaded

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 

Recently uploaded (20)

Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 

Introduction HTTP via cURL

  • 1. cURL ( ) 2011-09-12( )
  • 2. curl - transfer a URL • curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). 2011-09-12( )
  • 3. why cURL is useful? • curl -O http://example.com/ wallpapers/img[01-19].jpg 2011-09-12( )
  • 4. why cURL is useful for Web Developers 2011-09-12( )
  • 5. HTTP $ telnet www.google.co.jp 80 Trying 74.125.153.105... Connected to www.l.google.com. Escape character is '^]'. GET / HTTP/1.1 Host: www.google.co.jp < > 2011-09-12( )
  • 6. GET / HTTP/1.1 [method] [request-uri] HTTP/1.1 2011-09-12( )
  • 8. Host: www.google.co.jp Host: < > 2011-09-12( )
  • 9. HTTP $ telnet www.google.co.jp 80 Trying 74.125.153.105... Connected to www.l.google.com. Escape character is '^]'. GET / HTTP/1.1 Host: www.google.co.jp < > 2011-09-12( )
  • 10. curl $ curl -v http://www.google.co.jp * About to connect() to www.google.co.jp port 80 (#0) * Trying 74.125.153.106... connected* Connected to www.google.co.jp (74.125.153.106) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.21.7 ... > Host: www.google.co.jp > Accept: */* > < HTTP/1.1 200 OK < Date: Thu, 08 Sep 2011 06:47:44 GMT < Expires: -1 < Cache-Control: private, max-age=0 2011-09-12( )
  • 11. curl --head curl --verbose|-v (curl --trace-ascii dump) 2011-09-12( )
  • 12. HTTP Header $ curl -v http://www.google.co.jp * (ry) > GET / HTTP/1.1 > User-Agent: curl/7.21.7 ... > Host: www.google.co.jp > Accept: */* > < HTTP/1.1 200 OK < Date: Thu, 08 Sep 2011 06:47:44 GMT < Expires: -1 < Cache-Control: private, max-age=0 2011-09-12( )
  • 13. HTTP Request Headers Accept Accept-Language Authorization Host Referer User-Agent 2011-09-12( )
  • 14. $ curl -v -H 'Accept-Language: ja' http://twitter.com | nokogrep -a content 'meta[name=description]' > GET / HTTP/1.1 > User-Agent: curl/7.21.7 > Host: twitter.com > Accept: */* > Accept-Language: ja > < HTTP/1.1 200 OK ... 2011-09-12( )
  • 15. $ curl -v -H 'Accept-Language: en' http://twitter.com | nokogrep -a content 'meta[name=description]' > GET / HTTP/1.1 > User-Agent: curl/7.21.7 > Host: twitter.com > Accept: */* > Accept-Language: en > < HTTP/1.1 200 OK ... Instantly connect to what's most important to you. Follow your friends, experts, favorite celebrities, and breaking news. 2011-09-12( )
  • 16. $ curl -v -H 'Accept: application/json' http://jobs.dev/jobs | ruby -rpp -rjson -e 'pp JSON.parse(STDIN.read)' > GET /jobs HTTP/1.1 > User-Agent: curl/7.21.7 > Host: jobs.dev > Accept: application/json 2011-09-12( )
  • 17. < HTTP/1.1 200 OK < Content-Type: application/json; charset=utf-8 < X-UA-Compatible: IE=Edge < ETag: "1490b2d47b09a5abb92bd7eb09c4c51e" < Cache-Control: max-age=0, private, must-revalidate < X-Runtime: 0.059816 < Connection: keep-alive < Transfer-Encoding: chunked [{"created_at"=>"2011-09-07T05:56:22Z", "deadline"=>"2011-09-07", "description"=>" !!!", "id"=>1, "public"=>true, "title"=>"10 ", "updated_at"=>"2011-09-07T09:59:33Z"}] 2011-09-12( )
  • 18. HTTP Response HTTP/1.1 200 OK Date: Mon, 12 Sep 2011 01:27:34 GMT Server: hi Status: 200 OK ETag: "ceedd0ac4f0339411aab820e225afcdf" Content-Type: text/html; charset=utf-8 Content-Length: 44188 Pragma: no-cache Expires: Tue, 31 Mar 1981 05:00:00 GMT Cache-Control: no-cache, no-store, must- revalidate, pre-check=0, post-check=0 X-XSS-Protection: 1; mode=block 2011-09-12( )
  • 19. HTTP Response HTTP/1.1 200 OK Date: Mon, 12 Sep 2011 01:27:34 GMT Server: hi Status: 200 OK ETag: "ceedd0ac4f0339411aab820e225afcdf" Content-Type: text/html; charset=utf-8 Content-Length: 44188 Pragma: no-cache Expires: Tue, 31 Mar 1981 05:00:00 GMT Cache-Control: no-cache, no-store, must- revalidate, pre-check=0, post-check=0 X-XSS-Protection: 1; mode=block 2011-09-12( )
  • 20. Status line 200 302 400 404 500 503 2011-09-12( )
  • 21. HTTP Status is app UI 200 404 ? 410(Gone) 2011-09-12( )
  • 22. HTTP Response Headers Location Server Content-Type Content-Length Expire, ETag, Cache-Control 2011-09-12( )
  • 24. POST via curl $ curl -v -d email=moro@example.jp -d password=hogehoge http://example.com/users POST /users HTTP/1.1 User-Agent: curl/7.21.7 Host: example.com Accept: */* Content-Length: 36 Content-Type: application/x-www-form-urlencoded 2011-09-12( )
  • 25. HTTP/1.1 201 Created Content-Type: application/json Date: Mon, 12 Sep 2011 01:43:41 GMT Server: journey/0.4.0 Content-Length: 71 Connection: keep-alive {"email":"moro@example.jp","_id":"4e6d63cd981 5710100000005","profiles":[]} 2011-09-12( )
  • 27. HTTP Authentication $ curl -v -u moro@example.jp:hogehoge http://example.com/account GET /account HTTP/1.1 Authorization: Basic bW9yb0BleGFtcGxlLmpwOmhvZ2Vob2dl User-Agent: curl/7.21.7 Host: example.com Accept: */* 2011-09-12( )
  • 28. HTTP Authentication HTTP/1.1 200 OK Content-Type: application/json Date: Mon, 12 Sep 2011 01:51:00 GMT Server: journey/0.4.0 Content-Length: 71 Connection: keep-alive {"email":"moro@example.jp","_id":"4e6d63cd9 815710100000005","profiles":[]} 2011-09-12( )
  • 29. cookie & cURL http://flic.kr/p/5ekGdX 2011-09-12( )
  • 30. cookie • HTTP {Cookie} Web http://www.studyinghttp.net/cookies 2011-09-12( )
  • 31. [res] Set-Cookie [req] Cookie • Netscape Set-Cookie Cookie 2 HTTP http://www.studyinghttp.net/cookies#HeadersForCookie 2011-09-12( )
  • 35. without cookie $ curl -q http://jobs.dev | nokogrep '#header p.greeting' Who are you? Sign in 2011-09-12( )
  • 36. Cookie & cURL $ curl -v -b '_jobs_session=BAh7CEkiD3Nl( )' http://jobs.dev | nokogrep '#header p.greeting' GET / HTTP/1.1 User-Agent: curl/7.21.7 Host: jobs.dev Accept: */* Cookie: _jobs_session=BAh7CEkiD3Nl( ) 2011-09-12( )
  • 37. Cookie & cURL HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 X-UA-Compatible: IE=Edge ETag: "8c0c63144925e4cc29b655906c221a3f" Set-Cookie:_jobs_session=BAh7CEkiD3Nl( ) X-Runtime: 0.156343 Connection: keep-alive Transfer-Encoding: chunked Hi moro@example.jp Sign out 2011-09-12( )
  • 39. $ curl -v -d 'user[email]=moro@example.jp' -d 'user[password]=hogehoge' http://jobs.dev/users/sign_in POST /users/sign_in HTTP/1.1 User-Agent: curl/7.21.7 Host: jobs.dev Accept: */* Content-Length: 51 Content-Type: application/x-www-form-urlencoded 2011-09-12( )
  • 40. HTTP/1.1 302 Moved Temporarily Location: http://jobs.dev/ Content-Type: text/html; charset=utf-8 X-UA-Compatible: IE=Edge Cache-Control: no-cache Set-Cookie: _jobs_session=BAh7CE( ) X-Runtime: 0.217055 Connection: keep-alive Transfer-Encoding: chunked <html><body>You are being <a href="http://jobs.dev/">redirected</ a>.</body></html> 2011-09-12( )
  • 41. $ curl -v -b '_jobs_session=BAh7CE( )' http://jobs.dev/ | nokogrep '#header p.greeting' GET / HTTP/1.1 User-Agent: curl/7.21.7 Host: jobs.dev Accept: */* Cookie: _jobs_session=BAh7CE( ) 2011-09-12( )
  • 42. HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 X-UA-Compatible: IE=Edge ETag: "98d16875bdceb8c5451e7706e6071ece" Cache-Control: max-age=0, private, must-revalidate Set-Cookie: _jobs_session=BAh7CUki( ) X-Runtime: 0.193951 Connection: keep-alive Transfer-Encoding: chunked Hi moro@example.jp Sign out 2011-09-12( )
  • 44. see also • http://www.studyinghttp.net/ • http://www.studyinghttp.net/ rfc_ja/rfc2616 • http://amazon.jp/dp/ 4774142042/morodiary05-22/ ref=nosim/ 2011-09-12( )