This request works from the Heroku console:
curl https://www.website.com -d "email=myemail@gmail.com&password=mypassword" -i -S
However, I am trying to run it using node-fetch and this isn't working
fetch("https://www.website.com", {
method: 'POST',
body: 'email=myemail@gmail.com&password=mypassword'
})
I have also tried this but it didn't work:
body: new URLSearchParams("email=myemail@gmail.com&password=mypassword")
The issue is that I get a different response headers when using the node-fetch than the (proper) ones I get using curl.