mirror of
https://github.com/labstack/echo.git
synced 2025-02-03 13:11:39 +02:00
commit
bb0735bbc5
@ -36,6 +36,11 @@ func (b *binder) MaxMemory() int64 {
|
||||
}
|
||||
|
||||
func (b *binder) Bind(r *http.Request, i interface{}) (err error) {
|
||||
if r.Body == nil {
|
||||
err = NewHTTPError(http.StatusBadRequest, "Request body can't be nil")
|
||||
return
|
||||
}
|
||||
defer r.Body.Close()
|
||||
ct := r.Header.Get(ContentType)
|
||||
err = ErrUnsupportedMediaType
|
||||
switch {
|
||||
|
Loading…
x
Reference in New Issue
Block a user