transporthttp

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtraHeaders

func ExtraHeaders(extra http.Header) gokithttp.RequestFunc

ExtraHeaders is a RequestFunc for setting extra headers for each request. This RequestFunc only makes sense for a client, as it modifies requests.

The returned function has some performance advantages over go-kit's SetRequestHeader, particularly when more than one header is supplied.

The header names are preprocessed using textproto.CanonicalMIMEHeaderKey just once.

func GetBody

func GetBody(logger log.Logger) func(context.Context, *http.Request) context.Context

GetBody returns a go-kit RequestFunc that sets the request's GetBody function. This ensures that redirects are properly followed automatically.

Types

This section is empty.

Jump to

Keyboard shortcuts

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