Commit 5755d07e authored by wangmingming's avatar wangmingming

组合session和request的 header cookie redirect 等

parent f0b8432b
Pipeline #369 canceled with stages
......@@ -137,7 +137,16 @@ func (s *Session) PreRequest(request *url.Request) (*http.Request, error) {
}
}
// * 是否自动跳转
if request.AllowRedirects {
s.Client.SetFollowRedirect(request.AllowRedirects)
} else {
if s.AllowRedirects {
s.Client.SetFollowRedirect(s.AllowRedirects)
} else {
s.Client.SetFollowRedirect(s.AllowRedirects)
}
}
// * 组合header
var headers map[string]string
if request.Headers != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment