ddliu / go-httpclient

Advanced HTTP client for golang
MIT License
465 stars 105 forks source link

添加header不成功 #5

Closed suntsh closed 10 years ago

suntsh commented 10 years ago

res, _ := c. WithHeader("Accept-Language", "en-us"). WithCookie(&http.Cookie{ Name: "name", Value: "github", }). WithHeader("Referer", "http://www.baidu.com"). Get(SERVER, nil)

fmt.Println(c.Headers)

添加header不成功啊,例子程序里面,你在最后打印c.headers 是空的

ddliu commented 10 years ago

Headers是存放默认Header的,WithHeader不会改变这个值