Relative Content

Tag Archive for javascriptformsexpressxmlhttprequest

Fetch returning XHR 500 for expressJS server

I have an ExpressJS server setup accepting GET and POST requests to the same URL. The POST is sent by a form, and sends data to a server, however submitting the form to send data requires a page reload. To prevent this, I tried using the fetch() function to send data, however this is resulting in an XHR Error Code 500. Submitting the form normally works just fine. Below is the code along with the problem