diff --git a/sysservice/httpservice.go b/sysservice/httpservice.go index 6c7c1bb..5a43629 100644 --- a/sysservice/httpservice.go +++ b/sysservice/httpservice.go @@ -121,6 +121,7 @@ func NewHttpHttpRouter(eventReciver event.IEventProcessor) IHttpRouter { func (slf *HttpSession) Query(key string) (string, bool) { + if slf.mapParam == nil { slf.mapParam = make(map[string]string) @@ -158,6 +159,15 @@ func (slf *HttpSession) AddHeader(key, value string) { slf.w.Header().Add(key,value) } +func (slf *HttpSession) GetHeader(key string) string{ + return slf.r.Header.Get(key) +} + +func (slf *HttpSession) DelHeader(key string) { + slf.r.Header.Del(key) +} + + func (slf *HttpSession) WriteStatusCode(statusCode int){ slf.statusCode = statusCode }