response

package
v0.0.0-...-a89b161 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2016 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(w http.ResponseWriter, err string, code int)

Error produces a JSON error response with the following structure: {"error":"some error message"}

func NoContent

func NoContent(w http.ResponseWriter)

NoContent writes a 204 no content response

func UnauthorizedError

func UnauthorizedError(w http.ResponseWriter, err string)

UnauthorizedError has to contain WWW-Authenticate header See http://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html#rfc.section.3

func WriteJSON

func WriteJSON(w http.ResponseWriter, v interface{}, code int)

WriteJSON writes JSON response

Types

This section is empty.

Jump to

Keyboard shortcuts

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