proxyutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeLatin1

func DecodeLatin1(reader io.Reader) (string, error)

DecodeLatin1 - decodes Latin1 string from the reader This method is useful for editing response bodies when you don't want to handle different encodings

func EncodeLatin1

func EncodeLatin1(str string) ([]byte, error)

EncodeLatin1 - encodes the string as a byte array using Latin1

func NewResponse

func NewResponse(code int, body io.Reader, req *http.Request) *http.Response

NewResponse builds a new HTTP response. If body is nil, an empty byte.Buffer will be provided to be consistent with the guarantees provided by http.Transport and http.Client.

func ReadDecompressedBody

func ReadDecompressedBody(res *http.Response) ([]byte, error)

ReadDecompressedBody reads full response body and decompresses it if necessary

Types

This section is empty.

Jump to

Keyboard shortcuts

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