title: REST API - works in chrome but curl did not work
body: <p>I am using a web service API. 
  <code>http://www.douban.com/j/app/radio/people?app_name=radio_desktop_win&amp;version=100&amp;user_id=&amp;expire=&amp;token=&amp;sid=&amp;h=&amp;channel=1&amp;type=n</code></p>
  
  <p>Typing that address into the chrome, expected result (json file containing song information) could be returned but when using <code>curl</code> it failed. (in both case,response code is OK but the response body is not correct in the later case )</p>
  
  <p>Here are the request info dumped using the Chrome developer tool:</p>
  
  <pre><code>Request URL:http://www.douban.com/j/app/radio/people?app_name=radio_desktop_win&amp;version=100&amp;user_id=&amp;expire=&amp;token=&amp;sid=&amp;h=&amp;channel=7&amp;type=n
  Request Method:GET
  Status Code:200 OK
  Request Headersview source
  Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  Accept-Encoding:gzip,deflate,sdch
  Accept-Language:zh-CN,zh;q=0.8
  Connection:keep-alive
  Cookie:bid="lwaJyClu5Zg"
  Host:www.douban.com
  User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
  Query String Parametersview sourceview URL encoded
  app_name:radio_desktop_win
  version:100
  user_id:
  expire:
  token:
  sid:
  h:
  channel:7
  type:n
  </code></pre>
  
  <p>However, using that API with curl, i.e <code>curl http://www.douban.com/j/app/radio/people?app_name=radio_desktop_win&amp;version=100&amp;user_id=&amp;expire=&amp;token=&amp;sid=&amp;h=&amp;channel=7&amp;type=n</code> will not return expected result.</p>
  
  <p>Even specifying the exactly header as what dumped from Chrome still failed.  </p>
  
  <pre><code>curl -v -H "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Accept-Encoding:gzip,deflat,sdcn" -H "Accept-Language:zh-CN,zh;q=0.8" -H "Cache-Control:max-age=0" -H "Connection:keep-alive"  -H "Host:www.douban.com" -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" http://www.douban.com/j/app/radio/people?app_name=radio_desktop_win&amp;version=100&amp;user_id=&amp;expire=&amp;token=&amp;sid=&amp;h=&amp;channel=7&amp;type=n
  </code></pre>
  
  <p>Below is what print out with <code>-v</code> from curl. Seems everything was identical with the request made by Chrome but still the response body is not correct.  </p>
  
  <blockquote>
    <p>GET /j/app/radio/people?app_name=radio_desktop_win HTTP/1.1
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
    Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,<em>/</em>;q=0.8
    Accept-Encoding:gzip,deflat,sdcn
    Accept-Language:zh-CN,zh;q=0.8
    Cache-Control:max-age=0
    Connection:keep-alive
    Host:www.douban.com</p>
  </blockquote>
  
  <p>Why this happened? Appreciate your help.</p>