Skip to content

net.http.mime #

fn exists #

fn exists(mt string) bool

returns true if the given MIME type exists

fn get_complete_mime_type #

fn get_complete_mime_type(mt string) MimeType

returns a MimeType for the given MIME type

fn get_content_type #

fn get_content_type(mt string) string

returns a content-type header ready to use for the given MIME type

fn get_default_ext #

fn get_default_ext(mt string) string

returns the default extension for the given MIME type

fn get_mime_type #

fn get_mime_type(ext string) string

returns the MIME type for the given file extension

struct MimeType #

struct MimeType {
	source       string
	extensions   []string
	compressible bool
	charset      string
}