Index | Files

package httpclient

import ""

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


Package Files


func FreezeOauthToken Uses

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 Uses

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.

Package httpclient imports 4 packages (graph). Updated 2018-11-11. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).