httpx

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2023 License: MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL