Documentation ¶
Index ¶
- Constants
- Variables
- func DoBufferReq(url string, params map[string]interface{}, method RequestMethod, ...) ([]byte, error)
- func DoReq(url string, params map[string]string, method RequestMethod, ...) error
- func PostJson(url string, params interface{}, respStruct interface{}, options ...ReqOptions) error
- type ReqOptions
- type RequestMethod
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 RequestMethod ¶
type RequestMethod string
Click to show internal directories.
Click to hide internal directories.