首页 > Golang是否有类似Python的requests的库?

Golang是否有类似Python的requests的库?

看了一下http中的Client,是一个比较简单的,很多可能需要自己封装,比如cookies等等。那么,golang有没有类似requests的库,方便做一些这些工作?

或者说在其他模块中提供类似功能?


http://golang.org/pkg/net/http/

Package http provides HTTP client and server implementations.

Get, Head, Post, and PostForm make HTTP requests:

resp, err := http.Get("http://example.com/")
...
resp, err := http.Post("http://example.com/upload", "image/jpeg", &buf)
...
resp, err := http.PostForm("http://example.com/form",
    url.Values{"key": {"Value"}, "id": {"123"}})
【热门文章】
【热门文章】