client

package
v0.0.0-...-e4b6a09 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

HTTPClient help to send http requests

func GetHTTPClient

func GetHTTPClient(insecure bool) *HTTPClient

GetHTTPClient returns the singleton HTTP client based on the insecure setting.

func NewHTTPClient

func NewHTTPClient(insecure bool) *HTTPClient

NewHTTPClient creates a new http client.

func (*HTTPClient) Get

func (hc *HTTPClient) Get(url string, cred *auth.Credential, parmas map[string]string, options map[string]string) ([]byte, error)

Get content from the url

func (*HTTPClient) Post

func (hc *HTTPClient) Post(url string, cred *auth.Credential, body interface{}, options map[string]string) ([]byte, error)

Post content to the service specified by the url

Jump to

Keyboard shortcuts

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