Skip to content

Breaking: Refactor ApiClient#295

Merged
vlaurin merged 1 commit intomainfrom
single-axios-instance
Feb 25, 2025
Merged

Breaking: Refactor ApiClient#295
vlaurin merged 1 commit intomainfrom
single-axios-instance

Conversation

@vlaurin
Copy link
Copy Markdown
Contributor

@vlaurin vlaurin commented Feb 24, 2025

Instead of creating an Axios instance for every request, allow for an Axios instance to be shared across all requests for a given client. This is required to enable the use of caching interceptors.

As a consequence, interceptors can no longer be used for request-centric logic (abort/auth) and instead a decorator must be used.

@vlaurin vlaurin added the type:breaking Breaking change label Feb 24, 2025
@vlaurin vlaurin requested a review from gbenadikar February 24, 2025 17:05
@vlaurin vlaurin force-pushed the single-axios-instance branch from 91b446a to d0d7fca Compare February 25, 2025 12:10
Instead of creating an Axios instance for every request, allow for an Axios instance to be shared across all requests for a given client.
This is required to enable the use of caching interceptors.

As a consequence, interceptors can no longer be used for request-centric logic (abort/auth) and instead a decorator must be used.
@vlaurin vlaurin force-pushed the single-axios-instance branch from d0d7fca to aca042c Compare February 25, 2025 12:20
@vlaurin vlaurin merged commit 665dc3a into main Feb 25, 2025
7 checks passed
@vlaurin vlaurin deleted the single-axios-instance branch February 25, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:breaking Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants