send o-post
by velo_ninja
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IFrame Example</title>
<style>
button {
padding: 10px;
font-size: 16px;
cursor: pointer;
}
</style>
</head>
<body>
<button onclick="sendDataToEndpoint()">Send Data to Endpoint</button>
<script>
function sendDataToEndpoint() {
const dataToSend = { key: 'value' };
fetch('https://www.media-junkie.com/yourEndpoint', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(dataToSend),
})
.then(response => response.json())
.then(data => {
console.log('Data sent successfully:', data);
})
.catch(error => {
console.error('Error sending data:', error);
});
}
</script>
</body>
</html>