Commit 3fd88b99 authored by wangmingming's avatar wangmingming

处理入参cookie

parent cf3a79bc
......@@ -102,6 +102,12 @@ func (s *Session) Do(method string, request *url.Request) (*models.Response, err
// 处理cookie
if request.Cookies != nil {
var cks []*http.Cookie
for k, v := range request.Cookies {
cks = append(cks, &http.Cookie{
Name: k,
Value: v,
})
}
uri, _ := url2.Parse(request.Url)
s.Client.SetCookies(uri, cks)
}
......
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