network

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestTimeOutSecond = 30

Functions

func CheckHttpServiceConnected

func CheckHttpServiceConnected(httpUrl string, timeOutSeconds int) bool

func CheckInternetConnected

func CheckInternetConnected() bool

func DownloadFile

func DownloadFile(url string, filepath string, header map[string]string) error

func GetQueryRequest

func GetQueryRequest(url string, params map[string]string, header map[string]string) (int, map[string]interface{}, error)

func PostBodyRequest

func PostBodyRequest(url string, jsonStr string, header map[string]string) (int, map[string]interface{}, error)

func PostFormDataRequest

func PostFormDataRequest(url string, params map[string]string, header map[string]string) (int, map[string]interface{}, error)

func PostFormDataWithFilesRequest added in v0.2.0

func PostFormDataWithFilesRequest(url string, params map[string]string, sendFiles []SendFile, header map[string]string) (int, map[string]interface{}, error)

func PostSoapRequest added in v0.2.0

func PostSoapRequest(url string, payload []byte, header map[string]string) (int, []byte, error)

func SendBodyRequest added in v0.2.8

func SendBodyRequest(method, url, jsonStr string, header map[string]string) (int, map[string]interface{}, error)

func SendFormDataRequest added in v0.2.8

func SendFormDataRequest(method, url string, params map[string]string, header map[string]string) (int, map[string]interface{}, error)

func SendFormDataWithFilesRequest added in v0.2.8

func SendFormDataWithFilesRequest(method, url string, params map[string]string, sendFiles []SendFile, header map[string]string) (int, map[string]interface{}, error)

func SendQueryRequest added in v0.2.8

func SendQueryRequest(method, url string, params map[string]string, header map[string]string) (int, map[string]interface{}, error)

func SendSoapRequest added in v0.2.8

func SendSoapRequest(method, url string, payload []byte, header map[string]string) (int, []byte, error)

Types

type SendFile added in v0.2.8

type SendFile struct {
	ParamName string
	Paths     []string
}

Jump to

Keyboard shortcuts

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