prefix

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package prefix provides fixed prefixing for HTTP client requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(inner httpclient.HttpClient, pfx interface{}) httpclient.HttpClient

Wrap wraps a HttpClient so that any request URL with undefined scheme/host will use the prefix supplied here. The prefix pfx should be a URL: either *net.URL or string (otherwise it panics).

func WrapWithHost

func WrapWithHost(inner httpclient.HttpClient, pfx interface{}) httpclient.HttpClient

WrapWithHost wraps a HttpClient so that any request URL with undefined scheme/host will use the prefix supplied here. The prefix pfx should be a URL: either *net.URL or string (otherwise it panics).

The Host header is also defined on all requests. See package hostheader.

Types

This section is empty.

Jump to

Keyboard shortcuts

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