var myHeaders = new Headers(); myHeaders.append('Content-Type', 'application/json'); fetch('/contact-form', { method: 'POST', headers: myHeaders, mode: 'cors', cache: 'default', body: JSON.stringify(fields) }).then(() => { dispatch(contactFormSubmitSuccess()); });
fetch('/api/v1/users', { method: 'post', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ "user": { "email" : email, "password" : password }}), })