Documentation
¶
Index ¶
- func FreePort() int
- func IP() map[string]string
- func ProcessFreePort(process *gou.Process) interface{}
- func ProcessGet(process *gou.Process) interface{}
- func ProcessIP(process *gou.Process) interface{}
- func ProcessPost(process *gou.Process) interface{}
- func ProcessPostJSON(process *gou.Process) interface{}
- func ProcessPut(process *gou.Process) interface{}
- func ProcessPutJSON(process *gou.Process) interface{}
- func ProcessSend(process *gou.Process) interface{}
- type Response
- func RequestGet(url string, params map[string]interface{}, headers map[string]string) Response
- func RequestPost(url string, data interface{}, headers map[string]string) Response
- func RequestPostJSON(url string, data interface{}, headers map[string]string) Response
- func RequestPut(url string, data interface{}, headers map[string]string) Response
- func RequestPutJSON(url string, data interface{}, headers map[string]string) Response
- func RequestSend(method string, url string, params map[string]interface{}, data interface{}, ...) Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessFreePort ¶
ProcessFreePort xiang.network.FreePort 获取可用端口
func ProcessGet ¶
ProcessGet xiang.helper.Get HTTP Get
func ProcessPost ¶
ProcessPost xiang.helper.Post HTTP Post
func ProcessPostJSON ¶
ProcessPostJSON xiang.helper.PostJSON HTTP Post
func ProcessPut ¶
ProcessPut xiang.helper.Put HTTP PUT
func ProcessPutJSON ¶
ProcessPutJSON xiang.helper.PutJSON HTTP PUT
func ProcessSend ¶
ProcessSend xiang.helper.Send HTTP Send
Types ¶
type Response ¶
type Response struct {
Status int `json:"status"`
Body string `json:"body"`
Data interface{} `json:"data"`
Headers map[string]interface{} `json:"headers"`
}
Response 请求响应结果
func RequestGet ¶
RequestGet 发送GET请求
func RequestPost ¶
RequestPost 发送POST请求
func RequestPostJSON ¶
RequestPostJSON 发送POST请求
func RequestPut ¶
RequestPut 发送PUT请求
func RequestPutJSON ¶
RequestPutJSON 发送PUT请求
Click to show internal directories.
Click to hide internal directories.