From 54b481c9f52eb1e00c27623796c03c9d7149ffa3 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Wed, 24 Oct 2018 18:40:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Query=20get=20set=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/session.go b/session.go index 8bb3d2c..f0c8a37 100644 --- a/session.go +++ b/session.go @@ -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)