View definition

(*Context).ContentType

Defined in github.com/hoisie/web/web.go

Description

ContentType sets the Content-Type header for an HTTP response. For example, ctx.ContentType("json") sets the content-type to "application/json" If the supplied value contains a slash (/) it is set as the Content-Type verbatim. The return value is the content type as it was set, or an empty string if none was found.

ContentType is referenced in 11 repositories

github.com/hoisie/web github.com/xyproto/siteengines github.com/nfleet/via

...