Goal
Replace client in Podium internals with this module.
Design goal: It should pretty much function like a regular fetch call
const httpClient = new HttpClient();
const response = await client.request({ /*options*/ });
// Catching
const httpClient = new HttpClient();
try {
const response = await client.request({ /*options*/ });
} catch (err) {
if (err === /breaker is open/) {
// Handle closed circuit breaker
}
}
Rough outline