compresshttp

package
v7.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodingIdentity = "identity"
	EncodingGzip     = "gzip"
	EncodingSnappy   = "x-snappy-framed"

	AcceptedEncodings = EncodingSnappy + ", " + EncodingGzip
)

Variables

View Source
var ErrUnacceptableEncoding = errors.New("unknown Content-Encoding")

Functions

func CompressRequest

func CompressRequest(request *http.Request, acceptEncoding string) error

func CompressResponse

func CompressResponse(r io.Reader, acceptEncoding string, writer http.ResponseWriter, status int) error

func DecompressRequest

func DecompressRequest(request *http.Request) error

func DecompressResponse

func DecompressResponse(response *http.Response) error

func Middleware added in v7.5.0

func Middleware(next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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