transport

package
v0.0.0-...-a6ac3e2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRequestFormat  = "REQUEST:\n--------\n%s\n--------\n"
	DefaultResponseFormat = "RESPONSE:\n========\n%s\n========\n"
	DefaultLoggingOutput  = os.Stderr
)

Functions

func LoggingOutput

func LoggingOutput(w io.Writer) func(*LoggingTransport)

func RequestFormat

func RequestFormat(fmt string) func(*LoggingTransport)

func ResponseFormat

func ResponseFormat(fmt string) func(*LoggingTransport)

Types

type LoggingTransport

type LoggingTransport struct {
	// contains filtered or unexported fields
}

func NewLoggingTransport

func NewLoggingTransport(inner http.RoundTripper, opts ...func(*LoggingTransport)) *LoggingTransport

func (*LoggingTransport) RoundTrip

func (t *LoggingTransport) 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