Linux下curl模拟带header的Http请求

格式: curl -H “头部内容” http://xxx.123.com

curl -H "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,en;q=0.6
Authorization:Digest username="admin", realm="UTT", nonce="4bea64239fe34c7d68ececbe053f9eb4", uri="/WANConfig.asp", algorithm=MD5, response="f2b1aed87b72e0e27f2a12647b0d150d", opaque="5ccc069c403ebaf9f0171e9517f40e41", qop=auth, nc=000002c5, cnonce="7f2abdd864b961a5"
Cache-Control:max-age=0
Connection:keep-alive
Cookie:COOKIE=c0a8016400000c00; language=zhcn; utt_bw_rdevType=
Host:192.168.1.1
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36" http://192.168.1.1/WANConfig.asp

参考:
http://blog.csdn.net/vindraz/article/details/50264283
http://www.yetdata.com/archives/128
http://man.linuxde.net/curl

你可能感兴趣的:(Linux,运维)