proxy.golang.org : github.com/andreyvit/httpsimplified
Package httpsimplified sends outgoing HTTP requests via a simple straightforward API distilled from many internal Golang projects at USA Today Network. It embraces Go stdlib types like url.Values and http.Header, provides composable building blocks for more complex use cases and doesn't try to be clever. Call Get, Post or Put to send a request and parse the response in a single call: where httpsimplified.JSON is a body parser function (we also provide PlainText, Bytes, Raw and None parsers, and you can define your own). See the example for more details. For more advanced requests, build http.Request yourself and call Perform: Use URL func to concatenate a URL and include query params. Use EncodeBody helper to generate application/x-www-form-urlencoded bodies. Finally, if http.DefaultClient doesn't rock your boat, you're free to build and execute a request through whatever means necessary and then call JSON, Bytes or None to verify the response status code and handle the body: To handle HTTP basic authentication, use BasicAuth helper:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/andreyvit/httpsimplified
License: MIT
Latest release: over 6 years ago
First release: over 7 years ago
Namespace: github.com/andreyvit
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago