httputil

package
v0.52.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package httputil contains functions that act as middleware for API interactions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggingRoundTripper

type LoggingRoundTripper struct {
	Proxied http.RoundTripper
	Logger  logging.Logger
}

LoggingRoundTripper implements http.RoundTripper. When set as Transport of http.Client, it executes HTTP requests with logging.

func (LoggingRoundTripper) RoundTrip

func (c LoggingRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip logs the http request and response in debug mode for all errors, where status code >= 400

Jump to

Keyboard shortcuts

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