Documentation ¶
Index ¶
- Constants
- Variables
- func Web(httpUrl string, param map[string]string) string
- type Config
- func (c *Config) DELETE(httpUrl string, param map[string]string) ([]byte, int, error)
- func (c *Config) GET(httpUrl string, param map[string]string) ([]byte, int, error)
- func (c Config) POST(httpUrl string, reqBody []byte) ([]byte, int, error)
- func (c *Config) POSTFILE(httpUrl string, param map[string]string, file []byte) []byte
- func (c *Config) POSTJSON(httpUrl string, params []byte) ([]byte, http.Header, int)
- func (c Config) PUT(httpUrl string, reqBody []byte) ([]byte, int, error)
- func (c *Config) SetHeader(k, v string)
Constants ¶
View Source
const AccessToken = "Access-Token"
View Source
const ApplicationFile = "multipart/form-data"
View Source
const ApplicationForm = "application/x-www-form-urlencoded;charset=utf-8"
View Source
const ApplicationJson = "application/json"
View Source
const ApplicationOctetStream = "application/octet-stream;charset=UTF-8"
View Source
const ApplicationXml = "application/xml;charset=utf-8"
View Source
const HttpTimeout = time.Duration(90 * time.Second)
View Source
const TlsTimeout = time.Duration(60 * time.Second)
Variables ¶
View Source
var GET = defaultConfig.GET
View Source
var POST = defaultConfig.POST
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.