Spaces:
Sleeping
Sleeping
Download frontend/src/api/client.js from avborg/adventure-log: direct link, hf CLI and curl.
- Browser
- Download file 287 Bytes
-
https://huggingface.co/spaces/avborg/adventure-log/resolve/main/frontend/src/api/client.js
- Command line
-
hf download hf://spaces/avborg/adventure-log/frontend/src/api/client.js
-
curl -L -o client.js https://huggingface.co/spaces/avborg/adventure-log/resolve/main/frontend/src/api/client.js
287 Bytes
| import axios from 'axios' | |
| const client = axios.create({ | |
| baseURL: '/rapi', | |
| }) | |
| client.interceptors.request.use((config) => { | |
| const token = localStorage.getItem('token') | |
| if (token) { | |
| config.headers.Authorization = `Bearer ${token}` | |
| } | |
| return config | |
| }) | |
| export default client | |