//发送GET请求
//url:请求地址
//response:请求返回的内容
func Get(url string) (response string) {
client := http.Client{
Timeout: 5 * time.Second}
resp, error := client.Get(url)
defer resp.Body.Close()
if error != nil {
panic(erro
Beego控制器发送GET/POST请求并获取返回信息
最新推荐文章于 2024-05-13 07:45:07 发布