From e89a20c72590ed6ccd824e304d6f219f87eab466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BB=A5=E8=AF=BA?= Date: Fri, 14 Aug 2020 15:19:56 +0800 Subject: [PATCH] add ReloadParam func to ghttp_request.go --- net/ghttp/ghttp_request.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/net/ghttp/ghttp_request.go b/net/ghttp/ghttp_request.go index fa2fd6420..368f6abd5 100644 --- a/net/ghttp/ghttp_request.go +++ b/net/ghttp/ghttp_request.go @@ -9,14 +9,15 @@ package ghttp import ( "context" "fmt" + "net/http" + "strings" + "time" + "github.com/gogf/gf/internal/intlog" "github.com/gogf/gf/os/gres" "github.com/gogf/gf/os/gsession" "github.com/gogf/gf/os/gview" "github.com/gogf/gf/util/guid" - "net/http" - "strings" - "time" "github.com/gogf/gf/os/gtime" "github.com/gogf/gf/text/gregex" @@ -222,3 +223,10 @@ func (r *Request) GetReferer() string { func (r *Request) GetError() error { return r.error } + +// ReloadParam used for request parameter filtering. +func (r *Request) ReloadParam() { + r.parsedBody = false + r.parsedForm = false + r.parsedQuery = false +}