created by Austin Poor
A quick and easy HTTP request library written in Go.
This library is inspired by the Python Requests library. I wrote it for myself in order to make the HTTP client process a little more ergonomic when writing Go code.
Check out some more examples and documentation here: a-poor.github.io/requests
Installation is quick and easy!
go get github.com/a-poor/requests
Here's a quick example of requests
in action.
package main
import (
"fmt"
"github.com/a-poor/requests"
)
func main() {
// Send the request
res, err := requests.SendGetRequest("https://google.com")
// If there was an error, print and return
if err != nil {
fmt.Printf("Error: %e\n", err)
return
}
// Print the response's status code
fmt.Printf("Status Code: %d\n", res.StatusCode)
}
Only the standard library!
Pull requests are super welcome! For major changes, please open an issue first to discuss what you would like to change. And please make sure to update tests as appropriate.
Or... feel free to just open an issue with some thoughts or suggestions or even just to say Hi and tell me if this library has been helpful!