This commit is contained in:
huangsimin 2018-10-24 16:54:54 +08:00
parent 8383a3820f
commit 01df404ead

View File

@ -34,9 +34,10 @@ type Session struct {
client *http.Client client *http.Client
transport *http.Transport transport *http.Transport
cookiejar http.CookieJar cookiejar http.CookieJar
params *Body body *Body
Header http.Header
auth *BasicAuth auth *BasicAuth
Header http.Header
} }
const ( const (
@ -95,7 +96,7 @@ func NewSession() *Session {
} }
client.Jar = cjar client.Jar = cjar
return &Session{client: client, params: &Body{}, transport: transport, auth: nil, cookiejar: client.Jar, Header: make(http.Header)} return &Session{client: client, body: &Body{}, transport: transport, auth: nil, cookiejar: client.Jar, Header: make(http.Header)}
} }
// SetConfig 设置配置 // SetConfig 设置配置