From bba773432bf1b4668c54551bc40fd40f4d79f3ff Mon Sep 17 00:00:00 2001 From: some Date: Tue, 8 Oct 2024 20:45:14 -0400 Subject: [PATCH] Change Body method to ReadBody --- prototype.go | 2 +- server.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prototype.go b/prototype.go index 4bf7132..65ef475 100644 --- a/prototype.go +++ b/prototype.go @@ -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) } diff --git a/server.go b/server.go index de9a2b2..d99318e 100644 --- a/server.go +++ b/server.go @@ -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()