Answers for "POST with form data in the Fetch API"

0

POST with form data in the Fetch API

let formData = new FormData();
formData.append('field1', 'value1');
formData.append('field2', 'value2');

fetch('{url}', {
    method: 'post',
    body: formData
})
    .then(response => console.log(response));
Posted by: Guest on October-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language