Makes it easy to use Axios in Tauri App, Adapted for Tauri App 2.0.0
v1 version see https://github.com/persiliao/axios-tauri-api-adapter/tree/v1
npm install axios-tauri-api-adapter
import axios from 'axios';
import axiosTauriApiAdapter from 'axios-tauri-api-adapter';
const client = axios.create({ adapter: axiosTauriApiAdapter });
Configure the allowed URLs Tauri App HTTP client
{
"permissions": [
{
"identifier": "http:default",
"allow": [{ "url": "https://*.tauri.app" }],
"deny": [{ "url": "https://private.tauri.app" }]
}
]
}
- Add
config.jwt
It's going to add JWT to the header