compression

package
v0.0.0-...-d7376be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compression

type Compression struct {
	// Core is the core functionality for plugins
	plugins.Core
}

Compression is a plugin that replaces the default ResponseWriter with a compression writer that compresses everything written to the response. Currently supports gzip and deflate

func New

func New() *Compression

New returns a newly initialized Compression plugin

func (*Compression) Handle

func (plugin *Compression) Handle(c *verto.Context, next http.HandlerFunc)

Handle is called on per web request to supply a compression writer to the other plugins and request handler. Currently only gzip and deflate are supported. The compression type used is the first supported compression type encountered in the 'Accept-Encoding' header of incoming requests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL