psy2 / biz_v
DmitrMakeev's picture
Create biz_v
94e14dc verified
raw
history blame
1.19 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Request</title>
</head>
<body>
<h1>API Request</h1>
<button id="sendRequestButton">Send Request</button>
<textarea id="responseArea" rows="10" cols="50" readonly></textarea>
<script>
document.getElementById('sendRequestButton').addEventListener('click', function() {
const token = 'YOUR_TOKEN_HERE'; // Замените на ваш токен
const url = 'https://online.bizon365.ru/api/v1/webinars/reports/getlist?maxDate=2021-08-06T00:00:00';
fetch(url, {
method: 'GET',
headers: {
'X-Token': token
}
})
.then(response => response.text())
.then(data => {
document.getElementById('responseArea').value = data;
})
.catch(error => {
console.error('Error:', error);
document.getElementById('responseArea').value = 'Error: ' + error.message;
});
});
</script>
</body>
</html>