hxutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneTransport

func CloneTransport(in *http.Transport) *http.Transport

CloneTransport creates a new *http.Transport object that has copied attributes from a given one.

func DrainResponseBody

func DrainResponseBody(r *http.Response) error

Types

type RoundTripperFunc

type RoundTripperFunc func(*http.Request, http.RoundTripper) (*http.Response, error)

func (RoundTripperFunc) Wrap

type RoundTripperWrapper

type RoundTripperWrapper struct {
	Next http.RoundTripper
	Func func(*http.Request, http.RoundTripper) (*http.Response, error)
}

func (*RoundTripperWrapper) RoundTrip

func (w *RoundTripperWrapper) RoundTrip(r *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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