Documentation
¶
Overview ¶
Package httpx implements helper function for HTTP requests.
Index ¶
Constants ¶
View Source
const JSONContentType = "application/json"
JSONContentType represents MIME type for JSON content.
Variables ¶
View Source
var DefaultHealthPath = "/health"
DefaultHealthPath is the default HTTP path for checking health.
Functions ¶
func JSON ¶
func JSON(w http.ResponseWriter, code int, v interface{}) error
JSON encodes json content to the ResponseWriter.
func NewHealthHandler ¶
func NewHealthHandler(v ...Health) http.HandlerFunc
NewHealthHandler returns a handler for application health checking.
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package middleware implements reusable HTTP middleware.
|
Package middleware implements reusable HTTP middleware. |
Click to show internal directories.
Click to hide internal directories.