network

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 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) error

func GetQueryRequest

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

func PostBodyRequest

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

func PostFormDataRequest

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

func PostFormDataWithFilesRequest added in v0.2.0

func PostFormDataWithFilesRequest(url string, params map[string]string, postFiles []PostFile) (int, map[string]interface{}, error)

func PostSoapRequest added in v0.2.0

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

Types

type PostFile added in v0.2.4

type PostFile struct {
	ParamName string
	Paths     []string
}

Jump to

Keyboard shortcuts

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