Hello.
Could you please help me with an http POST request in my web service. I couldn’t figure out what I was doing wrong.
I have a web service in a domain like “example.onrender.com”. And I have an index.php file in the root of my application. I need to get the response from a .php file by making a POST request to the correct endpoint of my application, but there are some "page not found " errors in the browser console. Can you help me please.
const response = await fetch(‘https://example.onrender.com/index’, {
method: ‘POST’,
body: jsonData,
headers: {
‘Content-Type’: ‘application/json; charset=utf-8’,
},
});