kirinlabs / HttpRequest

Simplified HTTP client, A simplie golang HTTP client library.
Apache License 2.0
175 stars 50 forks source link

header.set(host) 无效 #16

Closed dugei closed 4 years ago

dugei commented 4 years ago

in request.go : line 122

func (r Request) initHeaders(req http.Request) { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") for k, v := range r.headers { if strings.ToLower(k) == "host" { req.Host = v }else { req.Header.Set(k, v) } } }