1
My python endpoint is working perfectly, I’ve done tests using Postman.
The problem is when Javascript will call the method
Follow my Javascript code:
$("#Submit").click(function() {
var info = $('#form-contact').serializeArray()
var url = "http://0.0.0.0:5000/sendEmail";
$.post(url,
{
name: info[0].value,
subject: info[1].value,
email: info[2].value,
text: info[3].value
});
});
When I run, the following error appears:
POST http://0.0.0.0:5000/sendemail net:ERR_ADDRESS_INVALID
I repeat that by Postman works perfectly with exactly this address
So the difference between Postman and js is that the request is being made by the browser. Chrome? Experiment with another to mislead, and check if in the "Network" tab of Veloper tools there is no IP redirection happening or something similar.
– iamdlm
http://0.0.0.0:5000
? this address is invalid– Ricardo Pontual
is valid yes...
– dani
You can [Edit] the question and include the route that answers that call?
– Renan Gomes