Change Body method to ReadBody
This commit is contained in:
parent
9387a40eee
commit
bba773432b
@ -5,7 +5,7 @@ import "io"
|
||||
type RequestBuilder interface {
|
||||
Allowed(method string) (errRes ErrorResponse)
|
||||
Header(header Header) (errRes ErrorResponse)
|
||||
Body(body io.ReadCloser) (errRes ErrorResponse)
|
||||
ReadBody(body io.ReadCloser) (errRes ErrorResponse)
|
||||
Values(values Values) (errRes ErrorResponse)
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ func (srv *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
if ok := srv.handleError(req.Header(Header(r.Header)), w); !ok {
|
||||
return
|
||||
}
|
||||
if ok := srv.handleError(req.Body(r.Body), w); !ok {
|
||||
if ok := srv.handleError(req.ReadBody(r.Body), w); !ok {
|
||||
return
|
||||
}
|
||||
r.ParseForm()
|
||||
|
Loading…
Reference in New Issue
Block a user