Documentation ¶
Index ¶
- func APIGet(URL string) (string, *apiResp.ErrorResp)
- func APIPost(URL string, paramBody string) (string, *apiResp.ErrorResp)
- func APIPostMultiPart(req *http.Request) (string, *apiResp.ErrorResp)
- func BuildGetQuery(param interface{}, URL string, accessToken string) string
- func BuildPostMultiPartQuery(param interface{}, URL string, accessToken string, fieldName string, ...) (*http.Request, error)
- func BuildPostQuery(param interface{}, accessToken string) string
- func SetDefaultValues(param interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIPostMultiPart ¶
APIPostMultiPart : 带上传文件的post请求
func BuildGetQuery ¶
BuildGetQuery : 构建查询参数,已经进行URL encode了的.
func BuildPostMultiPartQuery ¶
func BuildPostMultiPartQuery(param interface{}, URL string, accessToken string, fieldName string, file *os.File) (*http.Request, error)
BuildPostMultiPartQuery : 构建上传文件的请求,返回的是 request 对象
func BuildPostQuery ¶
BuildPostQuery : 构建Post请求,返回的是 name=Ava&friend=Jess&friend=Sarah&friend=Zoe 类似这样子的格式
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.