const handler = () => {
const requestOptions = {
mode: 'no-cors' as RequestMode,
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ "logo": "t-shirt" })
};
fetch('http://localhost:8080/tshirt/19', requestOptions)
.then(response => response.json())
.then(data => setApiData({ postId: data.id }));
}