diff --git a/context.go b/context.go index 4816250..6cb6a07 100644 --- a/context.go +++ b/context.go @@ -473,3 +473,8 @@ func (c *Context) ErrorUseHandle(code int) { c.Abort() } } + +// GetProtocol 获取当前连接版本 +func (c *Context) GetProtocol() string { + return c.Request.Proto +}