http

package
v1.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRequest

func BuildRequest(method string, urlStr string, body io.Reader, token string, nodeName string) (*http.Request, error)

BuildRequest Creates a HTTP request.

func NewHTTPClient

func NewHTTPClient() *http.Client

NewHTTPClient create new client

func NewHTTPClientWithCA

func NewHTTPClientWithCA(capem []byte, certificate tls.Certificate) (*http.Client, error)

NewHTTPClientWithCA create client without certificate

func NewHTTPSClient

func NewHTTPSClient(certFile, keyFile string) (*http.Client, error)

NewHTTPSClient create https client

func SendRequest

func SendRequest(req *http.Request, client *http.Client) (*http.Response, error)

SendRequest sends a http request and return the resp info

Types

This section is empty.

Jump to

Keyboard shortcuts

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