mirror of
https://github.com/umami-software/umami.git
synced 2026-02-21 04:55:36 +01:00
file removed
This commit is contained in:
parent
ecff4e5244
commit
079cc8a42b
1 changed files with 0 additions and 28 deletions
28
test.html
28
test.html
|
|
@ -1,28 +0,0 @@
|
|||
<html>
|
||||
<script>
|
||||
async function postData(url = "", data = {}) {
|
||||
// Default options are marked with *
|
||||
const response = await fetch(url, {
|
||||
method: "GET", // *GET, POST, PUT, DELETE, etc.
|
||||
mode: "cors", // no-cors, *cors, same-origin
|
||||
cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
|
||||
credentials: "same-origin", // include, *same-origin, omit
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
"Authorization":"Bearer 6QEzcKYfrgQAemg1Z5e9oGwbGzPy2OAV3UH2N5IQF0Z7MwIhqtWTTCBCnQQcuFQEUJa3lXfkwD8G/SbFPKklcfDfbszJqIdxeDPwWbPY0ogSGebEVdz9lZBb0dQmgSEOEpVgG4ux+Qt18PzYX6fLEbCMqO6wR7A3Z5StDDct6s35kEQj1fW7ln7HXkgp22MJx3hqNgJ/01D6avAA+dv2A8uG3j64zaqmlK0S4tntczXbXGfR8u9x3qmMm74o+JMcfSnRiNMVA0zbDOVHx4w/GKzqfYs3HASY+qN7upwYIYPSk4AAY2o24cfVn5ZPGqyRuF91RXechyVe98n4tBll1edQ+XkqrAXQ6w==",
|
||||
"Orgin":"localhost"
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
redirect: "follow", // manual, *follow, error
|
||||
referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
|
||||
//body: JSON.stringify(data), // body data type must match "Content-Type" header
|
||||
});
|
||||
return response.json(); // parses JSON response into native JavaScript objects
|
||||
}
|
||||
|
||||
postData("http://localhost:8080/api/websites/", { answer: 42 }).then((data) => {
|
||||
console.log(data); // JSON data parsed by `data.json()` call
|
||||
});
|
||||
</script>
|
||||
</htm>
|
||||
Loading…
Add table
Add a link
Reference in a new issue