Update biz_v.html
Browse files- 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 = '
|
| 19 |
|
| 20 |
fetch(url, {
|
| 21 |
-
method: '
|
| 22 |
headers: {
|
| 23 |
-
'
|
| 24 |
-
}
|
|
|
|
| 25 |
})
|
| 26 |
-
.then(response => response.
|
| 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);
|