When Use Javascript to try to POST something using method: 'POST'
it for some reason resorts to GET. It gives me the error Cannot GET /openai/generateimage
but I don’t understand why it won’t try to POST it.
const response = await fetch('/openai/generateimage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt,
size,
}),
});