mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-13 23:24:45 +08:00
新增删除获取http头
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user