showSdk

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64

func Base64(fileName string) string

Base64 图片文件传base64

func ParseJson

func ParseJson(req string) (map[string]interface{}, error)

ParseJson 解析json

Types

type NormalReq

type NormalReq struct {
	// contains filtered or unexported fields
}

func NormalRequest

func NormalRequest(reqUrl string) *NormalReq

NormalRequest 通用请求

func ShowAPIRequest

func ShowAPIRequest(reqUrl string, appid int, sign string) *NormalReq

ShowAPIRequest 用于请求官网

func (*NormalReq) AddFileParma

func (request *NormalReq) AddFileParma(key, fileName string)

func (*NormalReq) AddHeadParma

func (request *NormalReq) AddHeadParma(key, value string)

func (*NormalReq) AddTextParam

func (request *NormalReq) AddTextParam(key, value string)

func (*NormalReq) Get

func (request *NormalReq) Get() (string, error)

Get get请求

func (*NormalReq) Post

func (request *NormalReq) Post() (string, error)

Post 请求包括文件上传部分

func (*NormalReq) SetTimeOut

func (request *NormalReq) SetTimeOut(timeOut time.Duration)

Jump to

Keyboard shortcuts

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