Initial commit
This commit is contained in:
commit
08a8a71c55
631 changed files with 139902 additions and 0 deletions
35
src/App.vue
Normal file
35
src/App.vue
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<script>
|
||||
fetchData();
|
||||
|
||||
function fetchData() {
|
||||
const api = "/api/query";
|
||||
|
||||
const username = import.meta.env.VITE_USERNAME;
|
||||
const password = "Ap&216991";
|
||||
|
||||
const token = btoa(`${username}:${password}`);
|
||||
|
||||
const headers = {
|
||||
Authorization: `Basic ${token}`,
|
||||
};
|
||||
|
||||
const request = {
|
||||
method: "post",
|
||||
body: JSON.stringify({
|
||||
query: "site.title",
|
||||
}),
|
||||
headers,
|
||||
};
|
||||
|
||||
fetch(api, request)
|
||||
.then((response) => response.json())
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>test</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue