httpUtil

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 10 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.2.2

func Get(baseUrl string, param map[string]string) (body []byte, err error)

func Post added in v0.2.6

func Post(url string, params RequestParams) ([]byte, error)

func RequestSync

func RequestSync(method, url string, header map[string]string, body []byte, httpWg *sync.WaitGroup, resp *Res, err error)

Types

type RequestParams added in v0.2.6

type RequestParams struct {
	Header  map[string]string
	Body    []byte
	Timeout time.Duration
}

type Res

type Res struct {
	Body []byte
	Code int
}

func Request

func Request(method, url string, header map[string]string, body []byte) (*Res, error)

Jump to

Keyboard shortcuts

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