From 6eac3b20469375fd4e77469a601253d1fb44522a Mon Sep 17 00:00:00 2001 From: wjqserver <114663932+WJQSERVER@users.noreply.github.com> Date: Mon, 2 Jun 2025 02:10:25 +0800 Subject: [PATCH] add GetProtocol --- context.go | 5 +++++ 1 file changed, 5 insertions(+) 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 +}