âšī¸ Status
Status sets the given status code to the http.ResponseWriter.
No Content-Type header is set at all.
func ExampleStatusGet(request there.Request) there.Response {
return there.Status(status.OK)
}
When this handler gets called, the final rendered result will be an empty body with the status 200
func Status(code int) Response {
return &statusResponse{code: code}
}
type statusResponse struct {
code int
}
func (j statusResponse) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
rw.WriteHeader(j.code)
}