gzip

package
v0.0.0-...-c354ab8 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2014 License: MIT Imports: 4 Imported by: 0

README

gzip

Gzip middleware for Martini.

API Reference

Usage

import (
  "github.com/codegangsta/martini"
  "github.com/codegangsta/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