gzip

package module
v0.0.0-...-b2bcf8b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2015 License: MIT Imports: 7 Imported by: 0

README

gzip wercker status

Gzip middleware for Martini.

API Reference

Usage

import (
  "github.com/go-martini/martini"
  "github.com/martini-contrib/gzip"
)

func main() {
  m := martini.Classic()
  // gzip every request
  m.Use(gzip.All())
  m.Run()
}

Make sure to include the Gzip middleware above other middleware that alter the response body (like the render middleware).

Authors

Documentation

Index

Constants

View Source
const (
	HeaderAcceptEncoding  = "Accept-Encoding"
	HeaderContentEncoding = "Content-Encoding"
	HeaderContentLength   = "Content-Length"
	HeaderContentType     = "Content-Type"
	HeaderVary            = "Vary"
)

Variables

This section is empty.

Functions

func All

func All() martini.Handler

All returns a Handler that adds gzip compression to all requests

Types

This section is empty.

Jump to

Keyboard shortcuts

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