2016-01-29 09:46:11 +02:00
|
|
|
package standard
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
|
|
|
|
type (
|
|
|
|
Header struct {
|
2016-02-05 00:40:08 +02:00
|
|
|
header http.Header
|
2016-01-29 09:46:11 +02:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (h *Header) Add(key, val string) {
|
2016-02-05 00:40:08 +02:00
|
|
|
h.header.Add(key, val)
|
2016-01-29 09:46:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) Del(key string) {
|
2016-02-05 00:40:08 +02:00
|
|
|
h.header.Del(key)
|
2016-01-29 09:46:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) Get(key string) string {
|
2016-02-05 00:40:08 +02:00
|
|
|
return h.header.Get(key)
|
2016-01-29 09:46:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) Set(key, val string) {
|
2016-02-05 00:40:08 +02:00
|
|
|
h.header.Set(key, val)
|
|
|
|
}
|
|
|
|
|
2016-02-21 00:04:09 +02:00
|
|
|
func (h *Header) Object() interface{} {
|
|
|
|
return h.header
|
|
|
|
}
|
|
|
|
|
2016-02-05 00:40:08 +02:00
|
|
|
func (h *Header) reset(hdr http.Header) {
|
|
|
|
h.header = hdr
|
2016-01-29 09:46:11 +02:00
|
|
|
}
|