Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPRequestAccepts ¶
HTTPRequestAccepts returns true if the given request accepts the provided MIME type
func JSONErrResponse ¶
func JSONErrResponse(w http.ResponseWriter, err error, statusCode int)
JSONErrResponse Sends an `error` as a JSON object with a `message` property
func JSONResponse ¶
func JSONResponse(w http.ResponseWriter, v interface{}, statusCode int)
JSONResponse Sends a JSON payload in response to a HTTP request
func ParseJSONBody ¶
func ParseJSONBody(v interface{}, w http.ResponseWriter, r *http.Request) error
ParseJSONBody attempts to parse the request body as JSON
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.