Skip to content

Implement a first beta to replace the existing podium http client #11

@leftieFriele

Description

@leftieFriele

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions