ddliu / go-httpclient

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

请教个问题? #4

Closed suntsh closed 10 years ago

suntsh commented 10 years ago

c. WithHeader("User-Agent", "Super Robot"). WithHeader("custom-header", "value"). WithHeaders(map[string]string { "another-header": "another-value", "and-another-header": "another-value", }). WithOption(httpclent.OPT_TIMEOUT, 60). WithCookie(&http.Cookie{ Name: "uid", Value: "123", }). Get("http://github.com", nil) 上面添加的header和cookie是只对 Get("http://github.com", nil)这一次请求有效,还是对后面的请求都有效呢?

ddliu commented 10 years ago

Cookie设置后是一直有效的,header是一次有效的

ddliu commented 10 years ago

Header默认值已经支持