I'm trying to make an simple Login screen with my back-end already being done. The Login API is finished(after testing with POSTMan), however I've had issues with sending the JSON data back to my back-end in which it can read it.
const options = {
headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
"Accept": "application/json" }
}
axios.post('http://127.0.0.1/register/',
{
email: data.get('email'),
password: data.get('password'),
//SchoolID: '123456789'
}, options)
While it does send the request data back to the server, unfortunately it sends it back in a way in which my back-end cannot read it.
"email" : "mytest@email.com" // How my front-end sends it
email : "mytest@email.com" // How I want it to be done(POSTMan does it this way)