hostheader

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package hostheader provides a HttpClient wrapper that automatically inserts the Host header into the requests it makes. Host headers are a mandatory requirement (https://datatracker.ietf.org/doc/html/rfc7230#section-5.4).

See also package prefix that extends this by inserting a prefix on all URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(next httpclient.HttpClient, headerKeyVals ...string) httpclient.HttpClient

Wrap creates an automatic Host header inserter that wraps the next client. It also inserts other headers as specified in the list of key/value pairs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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