httpclient

package
v2.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRequestMutators = []RequestMutator{clientReqHeadersFromMD()}

DefaultRequestMutators are used for every outgoing request.

View Source
var DefaultResponseMutators = []ResponseMutator{}

DefaultResponseMutators are used for every received response.

Functions

This section is empty.

Types

type RequestMiddleware

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

RequestMiddleware processes HTTP requests and responses vs provided ClientOptions.

func NewMiddlewareGRPC

func NewMiddlewareGRPC(opts []grpc.CallOption) (*RequestMiddleware, error)

NewMiddlewareGRPC creates new RequestMiddleware from gRPC call options.

func (*RequestMiddleware) ProcessRequest

func (c *RequestMiddleware) ProcessRequest(r *http.Request) (*http.Request, error)

ProcessRequest processes outgoing HTTP requests.

func (*RequestMiddleware) ProcessResponse

func (c *RequestMiddleware) ProcessResponse(r *http.Response) (*http.Response, error)

ProcessResponse processes received HTTP responses.

type RequestMutator

type RequestMutator func(*http.Request) (*http.Request, error)

RequestMutator processes and/or mutates outgoing HTTP requests.

type ResponseMutator

type ResponseMutator func(*http.Response) (*http.Response, error)

ResponseMutator processes and/or mutates HTTP responses.

Jump to

Keyboard shortcuts

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