Added server tests

This commit is contained in:
2024-03-28 12:22:45 +01:00
parent 245a085020
commit 805f92468a
10 changed files with 116 additions and 36 deletions

View File

@ -20,7 +20,7 @@ type Response interface {
// response represents the HTTP response used in the given context.
type response struct {
body []byte
headers []header
headers []Header
status uint16
}
@ -49,7 +49,7 @@ func (res *response) SetHeader(key string, value string) {
}
}
res.headers = append(res.headers, header{Key: key, Value: value})
res.headers = append(res.headers, Header{Key: key, Value: value})
}
// SetBody replaces the response body with the new contents.