This commit is contained in:
parent
0442fc1e2e
commit
9a781d2e64
4 changed files with 28 additions and 9 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue