httpclient

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package httpclient builds the HTTP client every request carrying a credential goes through: the workspace API, login, logout and the Auth0 token exchanges.

Go's default redirect policy re-attaches Authorization whenever the destination hostname matches, whatever the scheme or port, and replays a request body on a 307 or 308 to any host. This client follows a redirect only while it stays on the origin of the request that started the chain.

It lives outside package client because api/auth0 needs it and package client imports api/auth0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(insecure bool) *http.Client

New returns a client that follows the system proxy settings as Go's default transport does, requires TLS 1.2, skips certificate verification only when insecure is set, and refuses any redirect that leaves the origin.

func StopAtCrossOrigin

func StopAtCrossOrigin(c *http.Client) *http.Client

StopAtCrossOrigin returns a copy of c that hands back a redirect leaving the origin as the 3xx response instead of failing, so the caller can show it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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