Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerasd authored Jul 1, 2024
1 parent a0f68ac commit e92454a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TV Alert</title>
</head>
<body>
<button id="sendRequest">Send Request</button>

<script>
document.getElementById('sendRequest').addEventListener('click', async function() {
const payload = {
message: "Hello, World!"
};

try {
const response = await fetch('http://rolex.iptime.org/wh', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});

const result = await response.json();
console.log("Server response:", result);

// 브라우저 개발자 도구 콘솔에 출력
console.log("Received data from server:", result.data);
} catch (error) {
console.error("Error:", error);
}
});
</script>
</body>
</html>

0 comments on commit e92454a

Please sign in to comment.