From 7e4a6f9f148c93a453d925b01eda62eded235bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Fri, 28 Mar 2025 12:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0header=20key=20=E5=AE=9A?= =?UTF-8?q?=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- header.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/header.go b/header.go index c661e45..55d772a 100644 --- a/header.go +++ b/header.go @@ -24,3 +24,16 @@ var ( HeaderKeyAccessControlExposeHeaders HttpHeader = "Access-Control-Expose-Headers" // 允许浏览器端能够获取相应的header值 HeaderKeyAccessControlMaxAge HttpHeader = "Access-Control-Max-Age" // 控制发送预检请求options的频率,单位 : 秒 ) + +var ( + HeaderKeyContentType HttpHeader = "Content-Type" // 请求头中Content-Type的key + HeaderKeyReferer HttpHeader = "Referer" // 请求头中Referer的key + HeaderKeyUserAgent HttpHeader = "User-Agent" // 请求头中User-Agent的key + HeaderKeyAccept HttpHeader = "Accept" // accept + HeaderKeyAcceptEncoding HttpHeader = "Accept-Encoding" // accept-encoding + HeaderKeyAcceptLanguage HttpHeader = "Accept-Language" // accept-language + HeaderKeyAuthorization HttpHeader = "Authorization" // authorization + HeaderKeyCookie HttpHeader = "Cookie" // cookie + HeaderKeyOrigin HttpHeader = "Origin" // origin + HeaderKeyHost HttpHeader = "Host" // host +)