Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. let data = new FormData();
  2. data.append('note', 'new note value yo!');
  3.  
  4. let youth_visit_id = 1;
  5. let url = `/api/visit/${youth_visit_id}/edit-note/`;
  6.  
  7. fetch(url, {
  8. method: 'POST',
  9. body: data
  10. }).then(response => {
  11. console.log('response');
  12. console.log(response);
  13. console.log(`Status code: ${response.status}`)
  14. }).catch(ex => {
  15. console.log('exception');
  16. console.log(ex);
  17. console.log(`Status code: ${response.status}`)
  18. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement