mirror of
https://github.com/labstack/echo.git
synced 2025-01-10 00:28:23 +02:00
c19442d023
Signed-off-by: Vishal Rana <vr@labstack.com>
64 lines
1.1 KiB
Go
64 lines
1.1 KiB
Go
// +build !appengine
|
|
|
|
package fasthttp
|
|
|
|
import "github.com/valyala/fasthttp"
|
|
|
|
type (
|
|
RequestHeader struct {
|
|
header fasthttp.RequestHeader
|
|
}
|
|
|
|
ResponseHeader struct {
|
|
header fasthttp.ResponseHeader
|
|
}
|
|
)
|
|
|
|
func (h *RequestHeader) Add(key, val string) {
|
|
// h.RequestHeader.Add(key, val)
|
|
}
|
|
|
|
func (h *RequestHeader) Del(key string) {
|
|
h.header.Del(key)
|
|
}
|
|
|
|
func (h *RequestHeader) Get(key string) string {
|
|
return string(h.header.Peek(key))
|
|
}
|
|
|
|
func (h *RequestHeader) Set(key, val string) {
|
|
h.header.Set(key, val)
|
|
}
|
|
|
|
func (h *RequestHeader) Object() interface{} {
|
|
return h.header
|
|
}
|
|
|
|
func (h *RequestHeader) reset(hdr fasthttp.RequestHeader) {
|
|
h.header = hdr
|
|
}
|
|
|
|
func (h *ResponseHeader) Add(key, val string) {
|
|
// h.header.Add(key, val)
|
|
}
|
|
|
|
func (h *ResponseHeader) Del(key string) {
|
|
h.header.Del(key)
|
|
}
|
|
|
|
func (h *ResponseHeader) Get(key string) string {
|
|
return string(h.header.Peek(key))
|
|
}
|
|
|
|
func (h *ResponseHeader) Set(key, val string) {
|
|
h.header.Set(key, val)
|
|
}
|
|
|
|
func (h *ResponseHeader) Object() interface{} {
|
|
return h.header
|
|
}
|
|
|
|
func (h *ResponseHeader) reset(hdr fasthttp.ResponseHeader) {
|
|
h.header = hdr
|
|
}
|