render
v0.0.0-20230524193120-4de0a0e9a559
github.com/stnc/chi/render
Documentation
pkg.go.dev ↗Constants
ContentTypePlainText (5 declarations)
const ( ContentTypePlainText = iota ContentTypeHTML ContentTypeJSON ContentTypeEventStream ContentTypeXML )
Functions
Bind
func Bind(r io.Reader, v interface{}) error
HTML
func HTML(w http.ResponseWriter, status int, v string)
JSON
func JSON(w http.ResponseWriter, status int, v interface{})
Noop
func Noop(w http.ResponseWriter)
ParseContentType
func ParseContentType(next chi.Handler) chi.Handler
Respond
func Respond(w http.ResponseWriter, status int, v interface{})
String
func String(w http.ResponseWriter, status int, v string)
XML
func XML(w http.ResponseWriter, status int, v interface{})
Types
ContentType
type ContentType int