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.
Click to show internal directories.
Click to hide internal directories.