httpclient

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpRequest

func DumpRequest(req *http.Request) (string, error)

func WithFaasTransport

func WithFaasTransport(client *http.Client) *http.Client

WithFaasTransport clones the http.Client and wraps the Transport with a FaasTransport. If the provided client is nil, the http.DefaultClient is used.

Types

type FaasTransport

type FaasTransport struct {
	// Transport is the underlying HTTP transport to use when making requests.
	// It will default to http.DefaultTransport if nil.
	Transport http.RoundTripper
}

FaasTransport is an http.RoundTripper that adds default headers and request logging capabilities. Requests will be logged to the console if the FAAS_DEBUG environment variable is set to 1.

func (*FaasTransport) RoundTrip

func (t *FaasTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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