requests
created by Austin Poor
Welcome to the documentation for the Go package [github.com/a-poor/request].
requests is 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.
Table of Contents
Installation
Installation is quick and easy!
go get github.com/a-poor/requests
Quick Start
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)
}
Dependencies
Only the standard library!
Contributing
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!