Documentation ¶
Index ¶
- Constants
- func ModifyAcceptEncoding(header http.Header)
- type Gzip
- type HeaderModifier
- type Response
- func (r *Response) AddHeaderModifier(headerModifier HeaderModifier)
- func (r *Response) AddModifier(modifier ...hcl.Body)
- func (r *Response) AddPrivateCC()
- func (r *Response) Flush()
- func (r *Response) Header() http.Header
- func (r *Response) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (r *Response) IsHijacked() bool
- func (r *Response) StatusCode() int
- func (r *Response) WithEvalContext(ctx *eval.Context) *Response
- func (r *Response) Write(p []byte) (int, error)
- func (r *Response) WriteHeader(statusCode int)
- func (r *Response) WrittenBytes() int
Constants ¶
View Source
const ( SecureCookiesStrip = "strip" SecureCookieAV = "Secure" )
View Source
const ( AcceptEncodingHeader = "Accept-Encoding" ContentEncodingHeader = "Content-Encoding" ContentLengthHeader = "Content-Length" GzipName = "gzip" VaryHeader = "Vary" )
Variables ¶
This section is empty.
Functions ¶
func ModifyAcceptEncoding ¶
Types ¶
type Gzip ¶
type Gzip struct {
// contains filtered or unexported fields
}
func NewGzipWriter ¶
func NewGzipWriter(rw http.ResponseWriter, header http.Header) *Gzip
func (*Gzip) Write ¶
Write fills a small buffer first to determine if a compression is required or not.
func (*Gzip) WriteHeader ¶
type HeaderModifier ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response wraps the http.ResponseWriter.
func NewResponseWriter ¶
func NewResponseWriter(rw http.ResponseWriter, secureCookies string) *Response
NewResponseWriter creates a new ResponseWriter. It wraps the http.ResponseWriter.
func (*Response) AddHeaderModifier ¶
func (r *Response) AddHeaderModifier(headerModifier HeaderModifier)
func (*Response) AddModifier ¶
func (r *Response) AddModifier(modifier ...hcl.Body)
func (*Response) AddPrivateCC ¶
func (r *Response) AddPrivateCC()
func (*Response) IsHijacked ¶
func (*Response) StatusCode ¶
func (*Response) WithEvalContext ¶
WithEvalContext sets the eval context for the response modifiers.
func (*Response) WriteHeader ¶
WriteHeader wraps the WriteHeader method of the <http.ResponseWriter>.
func (*Response) WrittenBytes ¶
Click to show internal directories.
Click to hide internal directories.