🎨 Added more common headers and content-type strings

This commit is contained in:
Maxim Lebedev 2024-02-14 12:09:56 +06:00
parent d84563a515
commit 90eff9a812
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 23 additions and 10 deletions

View File

@ -1,20 +1,33 @@
package common package common
const ( const (
HeaderAcceptLanguage string = "Accept-Language" HeaderAccept string = "Accept"
HeaderAuthorization string = "Authorization" HeaderAcceptLanguage string = "Accept-Language"
HeaderContentLanguage string = "Content-Language" HeaderAuthorization string = "Authorization"
HeaderContentType string = "Content-Type" HeaderContentLanguage string = "Content-Language"
HeaderCookie string = "Cookie" HeaderContentType string = "Content-Type"
HeaderCookie string = "Cookie"
HeaderAccessControlAllowOrigin string = "Access-Control-Allow-Origin"
) )
const ( const (
MIMETextHTML string = "text/html" MIMEApplicationActivityJSON string = "application/activity+json"
MIMETextHTMLCharsetUTF8 string = MIMETextHTML + "; " + charsetUTF8 MIMEApplicationActivityJSONCharsetUTF8 string = MIMEApplicationActivityJSON + "; " + charsetUTF8
MIMETextPlain string = "text/plain" MIMEApplicationJRDKJSON string = "application/jrd+json"
MIMETextPlainCharsetUTF8 string = MIMETextPlain + "; " + charsetUTF8 MIMEApplicationJRDKJSONCharsetUTF8 string = MIMEApplicationJRDKJSON + "; " + charsetUTF8
MIMEApplicationJSON string = "application/json"
MIMEApplicationJSONCharsetUTF8 string = MIMEApplicationJSON + "; " + charsetUTF8
MIMEApplicationLdJSON string = "application/ld+json"
MIMEApplicationLdJSONProfile string = MIMEApplicationLdJSON + "; " + profile
MIMETextHTML string = "text/html"
MIMETextHTMLCharsetUTF8 string = MIMETextHTML + "; " + charsetUTF8
MIMETextPlain string = "text/plain"
MIMETextPlainCharsetUTF8 string = MIMETextPlain + "; " + charsetUTF8
) )
const Und string = "und" const Und string = "und"
const charsetUTF8 string = "charset=UTF-8" const (
charsetUTF8 string = "charset=UTF-8"
profile string = `profile="https://www.w3.org/ns/activitystreams"`
)