requestdecorator

package
v0.0.0-...-507705e Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicRequestConfig

type BasicRequestConfig struct {
	OperatorName   string
	OperatorCommit string
	ClusterID      string
}

BasicRequestConfig A standard implementation for configuring request headers

func (BasicRequestConfig) GetUserAgent

func (b BasicRequestConfig) GetUserAgent() string

GetUserAgent Get the string for the user agent header string

type RequestConfig

type RequestConfig interface {
	GetUserAgent() string
}

RequestConfig An interface for handling the configuration request headers

type RequestDecorator

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

RequestDecorator An object for updating the headers of a request

func New

New Initialize a new request decorator object

func (*RequestDecorator) UpdateHeaders

func (rd *RequestDecorator) UpdateHeaders(req *http.Request, contentType string)

UpdateHeaders Adds user agent and content type headers to a request

Jump to

Keyboard shortcuts

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