header

package module
v0.0.0-...-10fce0f Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeaderMiddleware

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

HeaderMiddleware adds headers to HTTP requests.

func New

func New(headers http.Header) *HeaderMiddleware

New creates a new HeaderMiddleware instance.

func (*HeaderMiddleware) Process

func (m *HeaderMiddleware) Process(ctx context.Context, httpClient *http.Client, req *http.Request, next middleware.NextFunc) (*http.Response, error)

Process applies headers to the request before passing it to the next middleware.

func (*HeaderMiddleware) SetLogger

func (m *HeaderMiddleware) SetLogger(l logger.Logger)

SetLogger sets the logger for the middleware.

Jump to

Keyboard shortcuts

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