2016-01-28 23:46:11 -08:00
|
|
|
package standard
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
|
|
|
|
type (
|
2016-03-14 19:58:46 -07:00
|
|
|
// Header implements `engine.Header`.
|
2016-01-28 23:46:11 -08:00
|
|
|
Header struct {
|
2016-03-10 12:05:33 -08:00
|
|
|
http.Header
|
2016-01-28 23:46:11 -08:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2016-03-14 23:33:16 -07:00
|
|
|
// Add implements `engine.Header#Add` method.
|
2016-01-28 23:46:11 -08:00
|
|
|
func (h *Header) Add(key, val string) {
|
2016-03-10 12:05:33 -08:00
|
|
|
h.Header.Add(key, val)
|
2016-01-28 23:46:11 -08:00
|
|
|
}
|
|
|
|
|
2016-03-14 23:33:16 -07:00
|
|
|
// Del implements `engine.Header#Del` method.
|
2016-01-28 23:46:11 -08:00
|
|
|
func (h *Header) Del(key string) {
|
2016-03-10 12:05:33 -08:00
|
|
|
h.Header.Del(key)
|
2016-01-28 23:46:11 -08:00
|
|
|
}
|
|
|
|
|
2016-03-14 23:33:16 -07:00
|
|
|
// Set implements `engine.Header#Set` method.
|
2016-01-28 23:46:11 -08:00
|
|
|
func (h *Header) Set(key, val string) {
|
2016-03-10 12:05:33 -08:00
|
|
|
h.Header.Set(key, val)
|
2016-02-20 14:04:09 -08:00
|
|
|
}
|
|
|
|
|
2016-03-14 23:33:16 -07:00
|
|
|
// Get implements `engine.Header#Get` method.
|
2016-03-14 19:58:46 -07:00
|
|
|
func (h *Header) Get(key string) string {
|
|
|
|
return h.Header.Get(key)
|
|
|
|
}
|
|
|
|
|
2016-02-04 14:40:08 -08:00
|
|
|
func (h *Header) reset(hdr http.Header) {
|
2016-03-10 12:05:33 -08:00
|
|
|
h.Header = hdr
|
2016-01-28 23:46:11 -08:00
|
|
|
}
|