network

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingRoundTripper

type LoggingRoundTripper struct {
	Base http.RoundTripper
	Log  *slog.Logger
}

LoggingRoundTripper is an http.RoundTripper that logs requests and responses

func NewLoggingRoundTripper

func NewLoggingRoundTripper(logger *slog.Logger, base http.RoundTripper) *LoggingRoundTripper

NewLoggingRoundTripper creates a new LoggingRoundTripper with the given logger

func (*LoggingRoundTripper) RoundTrip

func (lrt *LoggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface

Jump to

Keyboard shortcuts

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