Bling is a Go HTTP client library for creating and sending API requests written in Golang/Go.
Bling has cool methods which simplify setting HTTP Request properties and sending request. Check usage or the examples to learn how to use Bling in your code.
We're still under active development, adding support methods for retries, callbacks, etc.
- Method Setters: Get/Post/Put/Patch/Delete/Head
- Adding Request Headers
- Encode structs into URL query parameters
go get github.com/blinghttp/bling
Use Bling client to set request properties and easily send http request
blingClient := bling.New() //use's default http client if .Client(customClient) is not used
resp, err := blingClient.Get("https://github.com/blinghttp/bling").DoRaw() //DoRaw method returns raw http response
if err != nil {
fmt.Println("Some err", err)
return
}
defer resp.Body.Close()
responseBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Some err", err)
return
}
fmt.Println(string(responseBody))
We love PR's and highly encourage to contribute.