Render hook
The render hook is the last call of KCD, it takes the response returned by your handler and sends a marshaled version of the output back to the client with the default status code provided by the kcd.handler
.
A render hook must have this signature:
type RenderHook func(w http.ResponseWriter, r *http.Request, response interface{}, defaultStatusCode int) error
Last updated
Was this helpful?