proxy.golang.org : github.com/schollz/requests
Package requests is a minimal, atomic and expressive way of making HTTP requests. It is inspired partly by the HTTP request libraries in other dynamic languages like Python and Javascript. It is safe for all rodents, not just Gophers. Requests is built as a convenient, expressive API around Go's standard http package. With special Request and Response types to help facilitate and streamline RESTful tasks. To send a common GET request just like you'd do with `http.Get`. To send additional data, such as a query parameter, basic authorization header, or content type, just pass in functional options: The data can be a map or struct (anything JSON-marshalable). You can asynchronously wait on a GET response with `GetAsync`. The response returned has the type *requests.Response which embeds *http.Response type to provide more buffer-like methods such as Len(), String(), Bytes(), and JSON(). These special methods use bytes.Buffer under the hood, thus unread portions of data are returned. Make sure not to read from the response's body beforehand. Requests is an ongoing project. Any contribution is whole-heartedly welcomed. Package requests provide useful and declarative methods for RESTful HTTP requests.
Registry
-
Source
- Documentation
- JSON
- codemeta.json
purl: pkg:golang/github.com/schollz/requests
License: GPL-3.0
Latest release: 7 days ago
Namespace: github.com/schollz
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago