48 Star 107 Fork 11

喵了个咪 / phalgo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
curl.go 458 Bytes
一键复制 编辑 原始数据 按行查看 历史
喵了个咪 提交于 2016-06-14 11:05 . 2016/6/14 提交更新 版本v0.0.3
// PhalGo-Curl
// 调用HTTP请求,依赖beego-curl
// 喵了个咪 <wenzhenxi@vip.qq.com> 2016/5/11
// 依赖情况:
// "github.com/astaxie/beego"
package phalgo
import (
//"github.com/astaxie/beego/httplib"
"github.com/wenzhenxi/phalgo/httplib"
)
type Curl struct {
}
// Get请求
func (this *Curl)CurlGet(url string) (string, error) {
curl := httplib.Get(url)
str, err := curl.String()
if err != nil {
return "", err
}
return str, nil
}
Go
1
https://gitee.com/wenzhenxi/phalgo.git
git@gitee.com:wenzhenxi/phalgo.git
wenzhenxi
phalgo
phalgo
master

搜索帮助