Hel开发者_如何学JAVAlo i'm trying to make the following GET request thru CURL
GET http://localhost:80/ HTTP/1.1
Host: localhost
Proxy-Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
so i try curl -h "Host:localhost" localhost
but it dont work, any ideea where i go wrong here?
It is -H
not -h
:
curl -H "Host:localhost" localhost
精彩评论