httputil

package
v0.0.0-...-7456f7d Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoHttpFormReq

func DoHttpFormReq(ctx context.Context, urlStr string, params interface{}, options ...interface{}) (reqResp *http.Response, bodyByte []byte, err error)

func DoHttpFormUploadReq

func DoHttpFormUploadReq(ctx context.Context, urlStr, filedName, filename string) (reqResp *http.Response, bodyByte []byte, err error)

func DoHttpJsonReq

func DoHttpJsonReq(ctx context.Context, urlStr string, params interface{}, options ...interface{}) (reqResp *http.Response, bodyByte []byte, err error)

Types

type Client

type Client interface {
	Do(ctx context.Context, req *http.Request) (*http.Response, error)
}

func NewClient

func NewClient(timeout time.Duration) Client

Jump to

Keyboard shortcuts

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