An enhanced HTTP client for Go with features likes:
- Support call GET Method more than 1 URL and merged the response body.
- Set which values from the response body to show with Whitelist or Blacklist.
- HTTP retry if failed, with attempts and interval configuration.
go get github.com/KodepandaID/panggilhttpimport "github.com/KodepandaID/panggilhttp"
func main() {
client := panggilhttp.New()
resp, e := client.
Get("http://localhost:3000/hotels", nil, nil).
Do()
if e != nil {
panic(e)
}
}import "github.com/KodepandaID/panggilhttp"
func main() {
client := panggilhttp.New()
resp, e := client.
Get("http://localhost:3000/hotels", []string{"id_hotel", "name"}, nil).
Get("http://localhost:3000/hotel-destination", []string{"destination_id", "destinations"}, nil).
Do()
if e != nil {
panic(e)
}
}For more detailed API, please read Godoc reference
Copyright Yudha Pratama Wicaksana, Licensed under MIT.