httpwrapper

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 4 Imported by: 0

README

http-wrapper

The http.Client wrapper utilies in golang.

Go Reference Go Report Card GitHub issues license

gopher

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneHTTPClientWithHeaders

func CloneHTTPClientWithHeaders(httpClient *http.Client, headers map[string]string) (*http.Client, error)

CloneHTTPClientWithHeaders clone httpClient and add default request headers

func CloneHTTPClientWithMiddlewares added in v1.1.0

func CloneHTTPClientWithMiddlewares(httpClient *http.Client, middleware ...func(req *http.Request) error) (*http.Client, error)

CloneHTTPClientWithMiddlewares clone httpClient and add custom function to middleware should not modify the request.

func WrapHTTPClientWithHeaders

func WrapHTTPClientWithHeaders(httpClient *http.Client, headers map[string]string)

WrapHTTPClientWithHeaders add default request headers

func WrapHTTPClientWithMiddlewares added in v1.1.0

func WrapHTTPClientWithMiddlewares(httpClient *http.Client, middleware ...func(req *http.Request) error)

WrapHTTPClientWithMiddlewares add custom function to middleware should not modify the request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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