添加Query get set 方法
This commit is contained in:
parent
408995f2b4
commit
54b481c9f5
10
session.go
10
session.go
|
@ -173,6 +173,16 @@ func (ses *Session) SetConfig(typeConfig TypeConfig, values interface{}) {
|
||||||
return
|
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
|
// SetCookies 设置Cookies 或者添加Cookies Del
|
||||||
func (ses *Session) SetCookies(u *url.URL, cookies []*http.Cookie) {
|
func (ses *Session) SetCookies(u *url.URL, cookies []*http.Cookie) {
|
||||||
ses.cookiejar.SetCookies(u, cookies)
|
ses.cookiejar.SetCookies(u, cookies)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user