An Axios adapter for Tauri v2 apps that bridges browser-style HTTP requests with Tauri's HTTP plugin. Version 2.0.6 targets Tauri 2.0.0+ and requires Node >=16. It wraps Tauri's fetch API, allowing Axios usage with its full interceptor/transformer pipeline inside Tauri webviews. Unlike raw Tauri HTTP calls, this adapter provides Axios convenience features like request/response interceptors, automatic JSON parsing, and JWT header injection via config.jwt. Release cadence is irregular; the v1 branch supports Tauri 1.x.
npm install axios-tauri-api-adapterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create an Axios instance with the Tauri adapter and make a GET request with JWT.
Use only in Tauri app; for testing, mock the adapter.
Use axios-tauri-api-adapter@1 for Tauri v1 apps.
Add 'http:default' permission with allow/deny lists in capabilities.
Use standard headers Authorization instead if custom JWT handling is not needed.
Use import axiosTauriApiAdapter from 'axios-tauri-api-adapter'
Run only inside a Tauri v2 webview, or conditionally apply adapter with isTauri() check.
Add the URL pattern to 'allow' list in capabilities under 'http:default'.