gojek/heimdall ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go HTTP client library like Heimdall that helps applications make lots of requests reliably at scale.

I want it to feel simple to use, with a fluent style API for common HTTP methods, but also support retries with backoff, custom retry strategies, per request timeouts, and a hystrix style circuit breaker with optional fallbacks. It should work with the normal http.Response and accept either simple URLs or regular http.Request objects.

Please include a few clear examples in the README for a basic GET, a client with retries, and a client wrapped in a circuit breaker. Keep the code clean and idiomatic Go, with tests for the retry and backoff behavior. If you need to check current Go or hystrix related docs online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab