Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Html ¶ added in v0.12.2
type Html string
Html is a mark for text is HTML return "Content-Type": "text/html"
type KeepFunc ¶ added in v0.13.0
type KeepFunc func(w http.ResponseWriter) (keep bool)
type Response ¶
type Response struct { Body interface{} // contains filtered or unexported fields }
Response provide an abstraction for detailed HTTP response
func (*Response) ContentType ¶ added in v0.13.0
ContentType would change content-type of response by provided value
func (*Response) Cookies ¶ added in v0.12.2
Cookies would update cookies of response by provided cookies
func (*Response) ServeHTTP ¶ added in v0.13.0
func (res *Response) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*Response) Status ¶ added in v0.12.3
Status would change the status code of response by provided code, it would panic if you call it twice on the same response or you provide a invalid status code.
NOTE: According to https://tools.ietf.org/html/rfc2616#section-6.1.1 > The Status-Code element is a 3-digit integer
Click to show internal directories.
Click to hide internal directories.