httpclient

package
v0.0.0-...-c936f35 Latest Latest
Warning

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

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

Documentation

Overview

Package httpclient provides a testable wrapper around an existing *http.Client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreezeOauthToken

func FreezeOauthToken(client *http.Client, accessToken string)

FreezeOauthToken sets the client's token source to a static token source that always provides the given access token.

func Wrap

func Wrap(client *http.Client, newURL string)

Wrap redirects all calls from the original *http.Client to the given host. Typical usage would be httpclient.Wrap(client, server.URL), where server is a httptest.Server or equivalent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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