xhttp

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHeaders

func AddHeaders(target, source http.Header)

AddHeaders adds each source header onto the destination. Existing headers in the target are preserved. Headers already present in the target have the source's values appended.

This function assumes that the source is already canonicalized.

func CanonicalizeHeaderMap

func CanonicalizeHeaderMap(source map[string]string) http.Header

CanonicalizeHeaderMap produces an http.Header from a map of strings. Each key is canonicalized via http.CanonicalHeaderKey. This function is primarily useful when reading in configuration or when processing non-header maps.

func CanonicalizeHeaders

func CanonicalizeHeaders(source http.Header) http.Header

CanonicalizeHeaders returns a copy of the source with each key canonicalized via http.CanonicalHeaderKey. This is useful when reading headers from sources that are not guaranteed to have canonical header names, such as configuration files. Each key's values are shallow copied.

func SetHeaders

func SetHeaders(target, source http.Header)

SetHeaders works like AddHeader, except that any headers already present in the target are overwritten.

This function assumes that the source is already canonicalized.

Types

This section is empty.

Directories

Path Synopsis
SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0
pprof
SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0 Package pprof exposes simple integrations between net/http/pprof, gorilla/mux, and uber/fx.
SPDX-FileCopyrightText: 2017 Comcast Cable Communications Management, LLC SPDX-License-Identifier: Apache-2.0 Package pprof exposes simple integrations between net/http/pprof, gorilla/mux, and uber/fx.

Jump to

Keyboard shortcuts

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