do not parse content if GET
This commit is contained in:
parent
276268f1be
commit
296234d6e7
|
@ -96,6 +96,11 @@ func FetchFormData(req *http.Request) map[string]interface{} {
|
||||||
|
|
||||||
res := make(map[string]interface{})
|
res := make(map[string]interface{})
|
||||||
|
|
||||||
|
// Abort if GET request
|
||||||
|
if req.Method == "GET" {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
ct := req.Header.Get("Content-Type")
|
ct := req.Header.Get("Content-Type")
|
||||||
|
|
||||||
if strings.HasPrefix(ct, "application/json") {
|
if strings.HasPrefix(ct, "application/json") {
|
||||||
|
|
Loading…
Reference in New Issue