1var myHeaders = new Headers();
2myHeaders.append('Content-Type', 'application/json');
3
4fetch('/contact-form', {
5 method: 'POST',
6 headers: myHeaders,
7 mode: 'cors',
8 cache: 'default',
9 body: JSON.stringify(fields)
10}).then(() => {
11 dispatch(contactFormSubmitSuccess());
12});
13
1fetch('/api/v1/users', {
2 method: 'post',
3 headers: {'Content-Type': 'application/json'},
4 body: JSON.stringify({ "user": {
5 "email" : email,
6 "password" : password
7 }}),
8})
9