Added request headers
This commit is contained in:
@ -3,8 +3,6 @@ package web
|
||||
import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"git.akyoto.dev/go/router"
|
||||
)
|
||||
|
||||
// Response is the interface for an HTTP response.
|
||||
@ -22,8 +20,8 @@ type Response interface {
|
||||
// response represents the HTTP response used in the given context.
|
||||
type response struct {
|
||||
body []byte
|
||||
headers []header
|
||||
status uint16
|
||||
headers []router.Parameter
|
||||
}
|
||||
|
||||
// Body returns the response body.
|
||||
@ -51,7 +49,7 @@ func (res *response) SetHeader(key string, value string) {
|
||||
}
|
||||
}
|
||||
|
||||
res.headers = append(res.headers, router.Parameter{Key: key, Value: value})
|
||||
res.headers = append(res.headers, header{Key: key, Value: value})
|
||||
}
|
||||
|
||||
// SetBody replaces the response body with the new contents.
|
||||
|
Reference in New Issue
Block a user