jQuery AJAX to node server throws net::ERR_CONNECTION_REFUSED

后端 未结 1 2002
不思量自难忘°
不思量自难忘° 2021-01-07 11:28

I have disabled my firewall (ufw on Ubuntu 15.04 server). This seems to be the most common cause of this problem.

Additionally some people have problems using AJAX,

相关标签:
1条回答
  • 2021-01-07 12:14

    data: JSON.stringify(testdata),

    That's probably your problem. You need to serialize your json object. And you need to set the .ajax call to type of POST in options otherwise it will default to a get.

    0 讨论(0)
提交回复
热议问题