Golang Cookie和Token的使用

qq_40523 8 0 PDF 2021-02-23 16:02:35

func GetXXX(ctx *gin.Context){ uri:= http://xxxx.com client := &http.Client{} fmt.Println(uri) req:= GetInfo(uri) resp, err := client.Do(req) if err != nil { fmt.Println(访问接口出错) } body := resp.Body defer body.Close() //将接口传回的数据直接返回给前端 io.Copy(ctx.Writer, body) } func GetInfo(url st

用户评论
请输入评论内容
评分:
暂无评论