Implemented io.Reader for requests
All checks were successful
/ test (push) Successful in 18s

This commit is contained in:
Eduard Urbach 2025-06-12 17:44:28 +02:00
parent 0442fc1e2e
commit 9a781d2e64
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 28 additions and 9 deletions

View file

@ -2,12 +2,14 @@ package web
import (
"bufio"
"io"
"git.urbach.dev/go/router"
)
// Request is an interface for HTTP requests.
type Request interface {
io.Reader
Header(string) string
Host() string
Method() string
@ -18,14 +20,13 @@ type Request interface {
// request represents the HTTP request used in the given context.
type request struct {
reader *bufio.Reader
bufio.Reader
scheme string
host string
method string
path string
query string
headers []Header
body []byte
params []router.Parameter
}