One - One Code All

Blog Content

Go语言beego/httplib包的使用

Go   2014-09-03 16:13:09

import "github.com/astaxie/beego/httplib"

	b := httplib.Post("http://beego.me/")
	b.Param("username","astaxie")
	b.Param("password","123456")
	b.PostFile("uploadfile1", "httplib.pdf")
	b.PostFile("uploadfile2", "httplib.txt")
	str, err := b.String()
	if err != nil {
		t.Fatal(err)
	}
	fmt.Println(str)

 more docs http://beego.me/docs/module/httplib.md


参考链接:https://godoc.org/github.com/astaxie/beego/httplib 


上一篇:阿尔法 (ALPHA)策略
下一篇:airflow获取dag状态dag_state

The minute you think of giving up, think of the reason why you held on so long.