Change Body method to ReadBody

This commit is contained in:
some 2024-10-08 20:45:14 -04:00
parent 9387a40eee
commit bba773432b
Signed by: some
GPG Key ID: 65D0589220B9BFC8
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -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()