client

package
v0.0.0-...-827be1f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClientAuth

func BuildClientAuth(clientCert, clientCertKey string, clientCertConfig config.ClientAuth) config.ClientAuth

Creates a ClientAuth object

func BuildHeaders

func BuildHeaders(reqHeaders []string, configHeaders map[string]string, includeJSON bool) (map[string]string, error)

BuildHeaders will return a map[string]string of headers

func BuildURL

func BuildURL(path string, configURL string) (string, error)

BuildURL will compute the final URL to use in the request

func CreateClient

func CreateClient(followRedirects bool, timeout int, clientCert config.ClientAuth) (*http.Client, error)

CreateClient will create a new http.Client with basic defaults

func CreateRequest

func CreateRequest(method, url string, body []byte, headers map[string]string) (*http.Request, error)

CreateRequest will create a request object

func CreateUserAgent

func CreateUserAgent() string

func DisableTLSVerification

func DisableTLSVerification()

DisableTLSVerification disables TLS verification

func GetVersion

func GetVersion() string

GetVersion builds the version from the build branch

Types

This section is empty.

Jump to

Keyboard shortcuts

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