13 lines
404 B
JavaScript
13 lines
404 B
JavaScript
|
alert('work')
|
||
|
let post = 'vdk2ch'
|
||
|
let button = document.querySelector('button')
|
||
|
const push1= function() {fetch('http://vault.vdk2ch.ru:8200/v1/sys/wrapping/wrap',
|
||
|
{ method: 'POST',
|
||
|
headers: {
|
||
|
'Content-Type': 'application/json',
|
||
|
},
|
||
|
body: JSON.stringify(post),
|
||
|
})
|
||
|
.then((response) => response.json())
|
||
|
.then((posts) => console.log(posts));}
|
||
|
button.addEventListener('click', push1)
|