Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let data = new FormData();
- data.append('note', 'new note value yo!');
- let youth_visit_id = 1;
- let url = `/api/visit/${youth_visit_id}/edit-note/`;
- fetch(url, {
- method: 'POST',
- body: data
- }).then(response => {
- console.log('response');
- console.log(response);
- console.log(`Status code: ${response.status}`)
- }).catch(ex => {
- console.log('exception');
- console.log(ex);
- console.log(`Status code: ${response.status}`)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement