From 296234d6e7e123748883013d1cc6de50a677a77a Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 24 May 2018 16:18:14 +0200 Subject: [PATCH] do not parse content if GET --- request_builder.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/request_builder.go b/request_builder.go index 117c368..afb138c 100644 --- a/request_builder.go +++ b/request_builder.go @@ -96,6 +96,11 @@ func FetchFormData(req *http.Request) map[string]interface{} { res := make(map[string]interface{}) + // Abort if GET request + if req.Method == "GET" { + return res + } + ct := req.Header.Get("Content-Type") if strings.HasPrefix(ct, "application/json") {