Skip to content

Instantly share code, notes, and snippets.

@jhilden
Created March 27, 2012 08:05
Show Gist options
  • Save jhilden/2213884 to your computer and use it in GitHub Desktop.
Save jhilden/2213884 to your computer and use it in GitHub Desktop.
curl to with special HTTP accept header
curl -v -H "Accept: text/javascript, text/html, application/xml, */*" http://localhost:3000/places/12356-apartment-berlin-prenzlauerberg/calendar\?for_date\=2012-05-01
* About to connect() to localhost port 3000 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET /places/12356-apartment-berlin-prenzlauerberg/calendar?for_date=2012-05-01 HTTP/1.1
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: localhost:3000
> Accept: text/javascript, text/html, application/xml, */*
>
< HTTP/1.1 200 OK
< Content-Type: text/html; charset=utf-8
< X-Ua-Compatible: IE=Edge
< Etag: "1104f570811054afbe7b5e1bcf30233c"
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: 6520d2841f153bfc5bc3b7fe0b5a80c8
< X-Runtime: 0.069775
< Content-Length: 11746
< Server: WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
< Date: Tue, 27 Mar 2012 08:02:59 GMT
< Connection: Keep-Alive
< Set-Cookie: _session_id=38e4b3a697bdc628469b0461e39f661f; path=/; HttpOnly
<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment