httpclient

package
v0.0.0-...-c0caad5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_DIAL_TIMEOUT    int = 10
	DEFAULT_END2END_TIMEOUT int = 120

	RETRY_COUNT              = 2
	RETRY_INTERVAL           = 10
	RETRY_INTERVAL_INCREMENT = 10
)

Variables

This section is empty.

Functions

func HttpDelete

func HttpDelete(httpUrl string) ([]byte, error)

func HttpDoRequest

func HttpDoRequest(req *http.Request) ([]byte, error)

func HttpDoRequestWithTime

func HttpDoRequestWithTime(req *http.Request, timeoutInSecond int, end2endTimeoutInSecond int) ([]byte, error)

func HttpFromData

func HttpFromData(httpUrl string, params map[string]string) ([]byte, error)

func HttpGet

func HttpGet(httpUrl string, params map[string]string) ([]byte, error)

func HttpGetWithTimeOutAndRetry

func HttpGetWithTimeOutAndRetry(httpUrl string, params map[string]string, dialTimeOut, e2eTimeOut,
	retryCount, retryInterval, retryIntervalInc int) ([]byte, error)

func HttpPost

func HttpPost(httpUrl string, params map[string]string) ([]byte, error)

func HttpPostJsonWithHeaders

func HttpPostJsonWithHeaders(httpUrl string, body []byte, headers map[string]string, params map[string]string) ([]byte, error)

func HttpPostJsonWithHeadersWithTime

func HttpPostJsonWithHeadersWithTime(httpUrl string, body []byte, headers map[string]string, params map[string]string,
	timeoutInSecond int, end2endTimeoutInSecond int) ([]byte, error)

func HttpPostWithHeaders

func HttpPostWithHeaders(httpUrl string, body string, headers map[string]string, params map[string]string) ([]byte, error)

func HttpPostWithHeadersWithTime

func HttpPostWithHeadersWithTime(httpUrl string, body string, headers map[string]string, params map[string]string,
	timeoutInSecond int, end2endTimeoutInSecond int) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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