Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCai1111 committed Nov 16, 2016
1 parent 6664667 commit dd89efe
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 74 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"github.com/go-http-utils/headers"
)

fmt.Println(headers.HeaderAcceptCharset)
fmt.Println(headers.AcceptCharset)
// -> "Accept-Charset"

fmt.Println(headers.HeaderIfNoneMatch)
fmt.Println(headers.IfNoneMatch)
// -> "If-None-Match"

// ...
Expand Down
147 changes: 75 additions & 72 deletions headers.go
Original file line number Diff line number Diff line change
@@ -1,79 +1,82 @@
package headers

// Version is this package's version
const Version = "1.0.0"

// HTTP headers
const (
HeaderAccept = "Accept"
HeaderAcceptCharset = "Accept-Charset"
HeaderAcceptEncoding = "Accept-Encoding"
HeaderAcceptLanguage = "Accept-Language"
HeaderAuthorization = "Authorization"
HeaderCacheControl = "Cache-Control"
HeaderContentLength = "Content-Length"
HeaderContentMD5 = "Content-MD5"
HeaderContentType = "Content-Type"
HeaderIfMatch = "If-Match"
HeaderIfModifiedSince = "If-Modified-Since"
HeaderIfNoneMatch = "If-None-Match"
HeaderIfRange = "If-Range"
HeaderIfUnmodifiedSince = "If-Unmodified-Since"
HeaderMaxForwards = "Max-Forwards"
HeaderProxyAuthorization = "Proxy-Authorization"
HeaderPragma = "Pragma"
HeaderRange = "Range"
HeaderReferer = "Referer"
HeaderUserAgent = "User-Agent"
HeaderTE = "TE"
HeaderVia = "Via"
HeaderWarning = "Warning"
HeaderCookie = "Cookie"
HeaderOrigin = "Origin"
HeaderAcceptDatetime = "Accept-Datetime"
HeaderXRequestedWith = "X-Requested-With"
HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin"
HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods"
HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers"
HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers"
HeaderAccessControlMaxAge = "Access-Control-Max-Age"
HeaderAccessControlRequestMethod = "Access-Control-Request-Method"
HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers"
HeaderAcceptPatch = "Accept-Patch"
HeaderAcceptRanges = "Accept-Ranges"
HeaderAllow = "Allow"
HeaderContentEncoding = "Content-Encoding"
HeaderContentLanguage = "Content-Language"
HeaderContentLocation = "Content-Location"
HeaderContentDisposition = "Content-Disposition"
HeaderContentRange = "Content-Range"
HeaderETag = "ETag"
HeaderExpires = "Expires"
HeaderLastModified = "Last-Modified"
HeaderLink = "Link"
HeaderLocation = "Location"
HeaderP3P = "P3P"
HeaderProxyAuthenticate = "Proxy-Authenticate"
HeaderRefresh = "Refresh"
HeaderRetryAfter = "Retry-After"
HeaderServer = "Server"
HeaderSetCookie = "Set-Cookie"
HeaderStrictTransportSecurity = "Strict-Transport-Security"
HeaderTransferEncoding = "Transfer-Encoding"
HeaderUpgrade = "Upgrade"
HeaderVary = "Vary"
HeaderWWWAuthenticate = "WWW-Authenticate"
Accept = "Accept"
AcceptCharset = "Accept-Charset"
AcceptEncoding = "Accept-Encoding"
AcceptLanguage = "Accept-Language"
Authorization = "Authorization"
CacheControl = "Cache-Control"
ContentLength = "Content-Length"
ContentMD5 = "Content-MD5"
ContentType = "Content-Type"
IfMatch = "If-Match"
IfModifiedSince = "If-Modified-Since"
IfNoneMatch = "If-None-Match"
IfRange = "If-Range"
IfUnmodifiedSince = "If-Unmodified-Since"
MaxForwards = "Max-Forwards"
ProxyAuthorization = "Proxy-Authorization"
Pragma = "Pragma"
Range = "Range"
Referer = "Referer"
UserAgent = "User-Agent"
TE = "TE"
Via = "Via"
Warning = "Warning"
Cookie = "Cookie"
Origin = "Origin"
AcceptDatetime = "Accept-Datetime"
XRequestedWith = "X-Requested-With"
AccessControlAllowOrigin = "Access-Control-Allow-Origin"
AccessControlAllowMethods = "Access-Control-Allow-Methods"
AccessControlAllows = "Access-Control-Allow-s"
AccessControlAllowCredentials = "Access-Control-Allow-Credentials"
AccessControlExposes = "Access-Control-Expose-s"
AccessControlMaxAge = "Access-Control-Max-Age"
AccessControlRequestMethod = "Access-Control-Request-Method"
AccessControlRequests = "Access-Control-Request-s"
AcceptPatch = "Accept-Patch"
AcceptRanges = "Accept-Ranges"
Allow = "Allow"
ContentEncoding = "Content-Encoding"
ContentLanguage = "Content-Language"
ContentLocation = "Content-Location"
ContentDisposition = "Content-Disposition"
ContentRange = "Content-Range"
ETag = "ETag"
Expires = "Expires"
LastModified = "Last-Modified"
Link = "Link"
Location = "Location"
P3P = "P3P"
ProxyAuthenticate = "Proxy-Authenticate"
Refresh = "Refresh"
RetryAfter = "Retry-After"
Server = "Server"
SetCookie = "Set-Cookie"
StrictTransportSecurity = "Strict-Transport-Security"
TransferEncoding = "Transfer-Encoding"
Upgrade = "Upgrade"
Vary = "Vary"
WWWAuthenticate = "WWW-Authenticate"

// Non-Standard
HeaderXFrameOptions = "X-Frame-Options"
HeaderXXSSProtection = "X-XSS-Protection"
HeaderContentSecurityPolicy = "Content-Security-Policy"
HeaderXContentSecurityPolicy = "X-Content-Security-Policy"
HeaderXWebKitCSP = "X-WebKit-CSP"
HeaderXContentTypeOptions = "X-Content-Type-Options"
HeaderXPoweredBy = "X-Powered-By"
HeaderXUACompatible = "X-UA-Compatible"
HeaderXForwardedProto = "X-Forwarded-Proto"
HeaderXHTTPMethodOverride = "X-HTTP-Method-Override"
HeaderXForwardedFor = "X-Forwarded-For"
HeaderXRealIP = "X-Real-IP"
HeaderXCSRFToken = "X-CSRF-Token"
XFrameOptions = "X-Frame-Options"
XXSSProtection = "X-XSS-Protection"
ContentSecurityPolicy = "Content-Security-Policy"
XContentSecurityPolicy = "X-Content-Security-Policy"
XWebKitCSP = "X-WebKit-CSP"
XContentTypeOptions = "X-Content-Type-Options"
XPoweredBy = "X-Powered-By"
XUACompatible = "X-UA-Compatible"
XForwardedProto = "X-Forwarded-Proto"
XHTTPMethodOverride = "X-HTTP-Method-Override"
XForwardedFor = "X-Forwarded-For"
XRealIP = "X-Real-IP"
XCSRFToken = "X-CSRF-Token"
)

0 comments on commit dd89efe

Please sign in to comment.