-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
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
- Expand the circuit breaking behaviour and add more tests
- Enabled using an
AbortController - Write propper documentation
- Add types
- clean up test code
- Do some benchmarking