|
@@ -28,7 +28,7 @@ func DecodeRequest(req *http.Request, v interface{}) error {
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
method := strings.ToUpper(req.Method)
|
|
method := strings.ToUpper(req.Method)
|
|
|
- if method == "POST" || method == "PUT" || method == "DELETE" {
|
|
|
|
|
|
|
+ if method == "POST" || method == "PUT" {
|
|
|
contextType := req.Header.Get(ContentTypeHeader)
|
|
contextType := req.Header.Get(ContentTypeHeader)
|
|
|
if strings.HasPrefix(contextType, "multipart/form-data") {
|
|
if strings.HasPrefix(contextType, "multipart/form-data") {
|
|
|
return parseForm(req, v)
|
|
return parseForm(req, v)
|