@ -34,9 +34,13 @@ func Parse(r *http.Request, v interface{}) error {
return err
}
if r.ContentLength > 0 {
return ParseJsonBody(r, v)
return nil
// Parses the form request.
func ParseForm(r *http.Request, v interface{}) error {
if strings.Contains(r.Header.Get(ContentType), multipartFormData) {
@ -20,4 +20,4 @@ const (
CodeSignatureInvalidToken
)
var ErrBodylessRequest = errors.New("not a POST|PUT|PATCH request")
var ErrBodylessRequest = errors.New("not a POST|PUT|PATCH|DELETE request")