Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. export const createUser = () => {
  2. return async (dispatch) => {
  3. dispatch({ type: CREATE_USER });
  4.  
  5. console.log('we are in the create user function');
  6.  
  7. try {
  8. let response = await fetch('secret.com/v1/login/signup', {
  9. method: 'POST',
  10. headers: {
  11. Accept: 'application/json',
  12. 'Content-Type': 'application/json'
  13. },
  14. body: JSON.stringify({
  15. email: 'test1231273123@test.com',
  16. password: 'Asadasd123123',
  17. first_name: 'joe',
  18. last_name: 'doe',
  19. phone_number: '373738'
  20. })
  21. });
  22. console.log('response ' + JSON.stringify(response));
  23. } catch (error) {
  24. console.log(error);
  25. }
  26. };
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement