Commit f0b8432b authored by wangmingming's avatar wangmingming

组合session和request的 header cookie redirect 等

parent d313f60f
...@@ -23,7 +23,6 @@ func NewSession(tlsVersion tls.TlsVersion) *Session { ...@@ -23,7 +23,6 @@ func NewSession(tlsVersion tls.TlsVersion) *Session {
} }
type Session struct { type Session struct {
Params map[string]string
Headers map[string]string Headers map[string]string
Cookies map[string]string Cookies map[string]string
Auth []string Auth []string
...@@ -196,6 +195,7 @@ func (s *Session) PreResponse(request *url.Request, do *http.Response) (*models. ...@@ -196,6 +195,7 @@ func (s *Session) PreResponse(request *url.Request, do *http.Response) (*models.
StatusCode: do.StatusCode, StatusCode: do.StatusCode,
Request: request, Request: request,
} }
s.Cookies = resp.Cookies
return resp, nil return resp, 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