添加Query get set 方法

This commit is contained in:
huangsimin 2018-10-24 18:40:44 +08:00
parent 408995f2b4
commit 54b481c9f5

View File

@ -173,6 +173,16 @@ func (ses *Session) SetConfig(typeConfig TypeConfig, values interface{}) {
return
}
// SetQuery 设置url query的持久参数的值
func (ses *Session) SetQuery(values url.Values) {
ses.Query = values
}
// GetQuery 获取get query的值
func (ses *Session) GetQuery(values url.Values) url.Values {
return ses.Query
}
// SetCookies 设置Cookies 或者添加Cookies Del
func (ses *Session) SetCookies(u *url.URL, cookies []*http.Cookie) {
ses.cookiejar.SetCookies(u, cookies)