httphelpers

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrainAndClose

func DrainAndClose(resp *http.Response)

DrainAndClose consumes the remaining response body and closes it to allow connection reuse.

func JoinBasePath added in v1.5.0

func JoinBasePath(basePath, suffix string) string

JoinBasePath ensures the provided suffix is properly joined to the base prefix. The suffix may be relative or absolute and is treated as relative when the base is non-empty.

func NormalizeBasePath added in v1.5.0

func NormalizeBasePath(baseURL string) string

NormalizeBasePath converts a configured base URL into a path prefix that always begins with a leading slash and omits any trailing slash. An empty string indicates the root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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