Documentation ¶
Overview ¶
The package github.com/heptalium/httputil contains helper functions for processing HTTP requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRequest ¶
func ParseRequest(w http.ResponseWriter, r *http.Request, data interface{}) error
ParseRequest parses HTTP requests into a struct. It supports POST form values and JSON encoded data as request. The request type is determined by the Content-Type header.
func WriteHttpStatus ¶
func WriteHttpStatus(w http.ResponseWriter, status int)
WriteHttpStatus replies to the HTTP request with the status code and a message consisting of the status code and the corresponding message.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.