typesense / typesense/typesense-js
Is Axios interceptors available through Typesense.Client?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 569
- Forks
- 99
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 2
Description
Description
I’m working on using typesense-js in a Nuxt application, and I have the goal to manage access to my data by rotating and scoping API-keys through my backend with a fixed ttl. But I'm looking for a way to easily capture any old keys and refreshing them by looking for 401-exceptions through the API. Since you’re using axios I assumed I could use Axios interceptors in a way, but looking through the code i cant seem to find a way to do that. Am I missing something, or is there actually no way to pass interceptors down to the Axios client inside Typesense.Client?
Expected Behavior
A way to pass Axios Interceptors through the Typesense Client.
Actual Behavior
There seem to be no way to pass down Axios Interceptors through the Typesense Client.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining how the Typesense.Client creates and exposes its internal Axios client, using the issue's interceptor and 401-refresh scenario as the target behavior. Determine how Axios interceptors could be passed through the client; done when a caller can register them for API requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100