httpencoding

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0, NCSA Imports: 6 Imported by: 0

Documentation

Overview

Package httpencoding provides functions to transparently encode/decode HTTP bodies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressData

func CompressData(w http.ResponseWriter, r *http.Request) io.WriteCloser

CompressData returns a writer that writes encoded data to w. The chosen encoding is based on the Accept-Encoding header and defaults to the identity encoding.

func UncompressData

func UncompressData(r *http.Response) (io.ReadCloser, error)

UncompressData returns a reads that decodes data from r.Body. The encoding is determined based on the Content-Encoding header and an error is returned if the encoding is unknown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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