http

package
v0.1.46 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGet  = "GET"
	MethodPost = "POST"
)

Variables

View Source
var (
	Client http.Client
)

Functions

func DoBufferReq

func DoBufferReq(url string, params map[string]interface{}, method RequestMethod, options ...ReqOptions) ([]byte, error)

func DoReq

func DoReq(url string, params map[string]string, method RequestMethod, respStruct interface{}, options ...ReqOptions) error

func PostJson

func PostJson(url string, params interface{}, respStruct interface{}, options ...ReqOptions) error

Types

type ReqOptions

type ReqOptions func(req *http.Request)

type RequestMethod

type RequestMethod string

Jump to

Keyboard shortcuts

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