const sendRequest = async () => {
const response = await fetch("http://localhost:9000/api/user", {
method: "POST",
headers: {"Accept": "application/json", "Content-Type": "application/json"},
body: JSON.stringify({
username: "user",
avatarUrl: "none",
messageCount: 0
})
})
// делаем что то с response
}
<html lang="ru">
<head>
<title>МЯСНОЙ ДАР</title>
<meta charset="UTF-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="images/xphoto.png" type="image/x-icon">
</head>
<body>
<header>
<div class="HeaderContainer">
<div class="logo"> <img src="images/logo.png" alt=""> </div>
<a href="#" class="item photo"><img src="images/phone.png" alt="" width="45" height="45"></a>
<a href="#" class="item anim">КОМПАНИЯ</a>
<a href="#" class="item anim">ПРОДУКЦИЯ</a>
<a href="#" class="item anim">КЛИЕНТАМ</a>
<a href="#" class="item anim">КОНТАКТЫ</a>
<a href="#" class="item photo"><img src="images/poloski.png" alt="" width="45" height="40"></a>
</div>
</header>
<main>
<div class="container"> <!-- container начало -->
<div class="box">
<div class="slider middle"><!-- Слайдео начало -->
<div class="slides">
<input type="radio" name="r" id="r1" checked>
<input type="radio" name="r" id="r2">
<input type="radio" name="r" id="r3">
<input type="radio" name="r" id="r4">
<div class="slide s1"><img src="images/longkolbas.png" alt></div>
<div class="slide"><img src="images/kolbasa2.png" alt></div>
<div class="slide"><img src="images/kolbasa3.png" alt></div>
<div class="slide"><img src="images/kolbasa4.png" alt></div>
</div>
<div class="navigation">
<label for="r1" class="bar"> </label>
<label for="r2" class="bar"> </label>
<label for="r3" class="bar"> </label>
<label for="r4" class="bar"> </label>
</div>
</div><!-- Сладйер конец -->
</div> <!-- вот закрытый box -->
</div><!-- container конец -->
</main>
<footer class="container">
<a>это футер</a>
</footer>
</body>
</html>