diff options
| author | Adam Malczewski <[email protected]> | 2026-04-01 03:36:49 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-04-01 03:36:49 +0900 |
| commit | aec635c26ab1bb5bfb8b0ac0d7adda6ef17c2d75 (patch) | |
| tree | b6736c65074c146e615033a58427e4a5820ca35d /src/lib/api.ts | |
| parent | e872165ed8e6f761aa37d9d9222dd6eeb05984ed (diff) | |
| download | dispatch-web-backend-tester.tar.gz dispatch-web-backend-tester.zip | |
initbackend-tester
Diffstat (limited to 'src/lib/api.ts')
| -rw-r--r-- | src/lib/api.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/api.ts b/src/lib/api.ts new file mode 100644 index 0000000..649c683 --- /dev/null +++ b/src/lib/api.ts @@ -0,0 +1,11 @@ +import ky from 'ky' + +const apiUrl = import.meta.env.VITE_API_URL || '' + +export const api = ky.create({ + prefixUrl: apiUrl, + credentials: 'include', + headers: { + 'Content-Type': 'application/json', + }, +}) |
