http

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, timeout int, headers map[string]interface{}) (string, int, error)

func JsonReq

func JsonReq(r *JsonRequest) (string, int, error)

func PostForm

func PostForm(postUrl string, timeout int, postData url.Values, headers map[string]interface{}) (string, int, error)

postData url.Values{"key": {"Value"}, "id": {"123"}}

func PostFormComplex

func PostFormComplex(postUrl string, timeout int, postData url.Values, headers map[string]interface{}) (string, int, error)

func Send

func Send(method string, url string, timeout int, headers map[string]interface{}, reqParams interface{}) (body string, code int, err error)

func SendJson

func SendJson(url string, method string, data interface{}, timeout int, headers map[string]interface{}) (string, int, error)

Types

type JsonRequest

type JsonRequest struct {
	Url     string
	Method  string
	Body    []byte
	Timeout int
	Header  map[string]string
	Cookie  *http.Cookie
}

Jump to

Keyboard shortcuts

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