- 最新
- 最多得票
- 最多評論
Usually If the GET request work, POST request should work too. You can follow the below steps to diagnose and fix this issue:
Step 1: Troubleshoot the code to understand the difference in functioning of your GET and POST request.
Step 2: Check the status of your POST request, is it 200 or something else?(it should be 200 ideally because connection is intact as mentioned in the aforementioned question that GET request are already working) Step 3: Check if you have added CORS header in your NodeJS backend application code.
Step 4: Check if you have written your CORS code inside app.post() function inside of app.js on node.js server? (If yes then, you need to move the cors code at the top of the app.js node.js server file. and that will fix the issue and your POST request will also work as expected)
相關內容
- 已提問 6 個月前
- AWS 官方已更新 7 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前