heimdall
heimdall copied to clipboard
An enhanced HTTP client for Go
Another attempt on top of @vthiery 's work (cf #91)
Adding some parallelism in the test suite sheds light on concurrency issues.
```go server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(500) })) defer server.Close() retryCalled := 0 httpclient := httpclient.NewClient( httpclient.WithRetrier(heimdall.NewRetrierFunc(func(_ int) time.Duration { retryCalled++ return 1 * time.Second })), httpclient.WithRetryCount(0), )...
fix typo in readme
Currently looks like the retry mechanism will only engage if there's an actual [error in sending the request](https://github.com/gojek/heimdall/blob/master/httpclient/client.go#L155), or if it's a [5xx response code](https://github.com/gojek/heimdall/blob/master/httpclient/client.go#L164). It would be handy to...
whould be awesome if heimdall also capture response time and post to statsd
Hi. Does it really make sense, that the http retry mechanism is outside the CB call? For me this seems very unintuitive: When the CB is open, there will still...
ability to send custom logger on http request logger plugin would be helpful
Hi there! I think there is a problem with `MaxConcurrentRequests`: [It is defined here](https://github.com/gojek/heimdall/blob/1e5d5b5438c34091bf27811601f6320a8273a502/hystrix/hystrix_client.go#L24), but never used. How can I limit concurrent requests then?
Usecase: After using the HTTP client to Do the request. We want to directly unmarshal the response body into a certain struct. If it fails, we just want to know...