Documentation ¶
Index ¶
Constants ¶
View Source
const ( HTML = "text/html; charset=utf-8" JSON = "application/json; charset=utf-8" CSS = "text/css; charset=utf-8" JS = "application/javascript; charset=utf-8" SOURCEMAP = JSON MP3 = "audio/mpeg" )
Content types for different file types
View Source
const ( CONTENT_TYPE = "Content-Type" EXPIRES = "Expires" CACHE_CONTROL = "Cache-Control" CONTENT_DISPOSITION = "Content-Disposition" CONTENT_LENGTH = "Content-Length" NO_CACHE = "No-Cache" CONTENT_RANGE = "Content-Range" )
These constants store the different headers the suluvir application is setting explicitly
View Source
const ( GET = "GET" POST = "POST" DELETE = "DELETE" HEAD = "HEAD" PUT = "PUT" )
Available HTTP methods
Variables ¶
This section is empty.
Functions ¶
func GetContentType ¶
GetContentType returns the appropriate content type for a given file type. It returns an error, if no such content type could be found
func ServeJsonWithoutCache ¶
func ServeJsonWithoutCache(w http.ResponseWriter, v interface{}) error
ServeJsonWithoutCache takes a response writer and some data as parameters and sets the correct headers, so that clients do (hopefully) not store this response in their caches. It also writes the given data to the response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.