Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIMETypeText = "text/plain" MIMETypeTextUTF8 = "text/plain; charset=utf-8" MIMETypeHTML = "text/html" MIMETypeHTMLUTF8 = "text/html; charset=utf-8" MIMETypeXML = "text/xml" MIMETypeXMLUTF8 = "text/xml; charset=utf-8" MIMETypeCSS = "text/css" MIMETypePNG = "image/png" MIMETypeGIF = "image/gif" MIMETypeJPEG = "image/jpeg" MIMETypeSVG = "image/svg+xml" MIMETypeForm = "x-www-form-urlencoded" MIMETypeJSON = "application/json" MIMETypeJSONUTF8 = "application/json; charset=utf-8" MIMETypeRSS = "application/rss+xml" MIMETypeAtom = "application/atom+xml" MIMETypeZIP = "application/zip" MIMETypeJS = "application/javascript" MIMETypePDF = "application/pdf" )
Variables ¶
This section is empty.
Functions ¶
func SetResponseContentType ¶
func SetResponseContentType(w http.ResponseWriter, contentType string)
SetResponseContentType sets response Content-Type header to a specified value.
func SetResponseContentTypeFromExtension ¶
func SetResponseContentTypeFromExtension(w http.ResponseWriter, extension string)
SetResponseContentTypeFromExtension sets response Content-Type header from a file extension.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.