DmitrMakeev commited on
Commit
7406429
·
verified ·
1 Parent(s): 1cd5a2c

Update biz_v.html

Browse files
Files changed (1) hide show
  1. biz_v.html +7 -6
biz_v.html CHANGED
@@ -15,17 +15,18 @@
15
  <script>
16
  document.getElementById('sendRequestButton').addEventListener('click', function() {
17
  const token = document.getElementById('tokenInput').value;
18
- const url = 'https://online.bizon365.ru/api/v1/webinars/reports/getlist';
19
 
20
  fetch(url, {
21
- method: 'GET',
22
  headers: {
23
- 'X-Token': token
24
- }
 
25
  })
26
- .then(response => response.text())
27
  .then(data => {
28
- document.getElementById('responseArea').value = data;
29
  })
30
  .catch(error => {
31
  console.error('Error:', error);
 
15
  <script>
16
  document.getElementById('sendRequestButton').addEventListener('click', function() {
17
  const token = document.getElementById('tokenInput').value;
18
+ const url = '/send_request';
19
 
20
  fetch(url, {
21
+ method: 'POST',
22
  headers: {
23
+ 'Content-Type': 'application/x-www-form-urlencoded'
24
+ },
25
+ body: 'token=' + encodeURIComponent(token)
26
  })
27
+ .then(response => response.json())
28
  .then(data => {
29
+ document.getElementById('responseArea').value = JSON.stringify(data, null, 2);
30
  })
31
  .catch(error => {
32
  console.error('Error:', error);