let data = new Object(); data = { // data } var form = new URLSearchParams(data); const url = `${baseUrl}/`; var request = new Request(url, { method: 'POST', body: form, headers: new Headers({ 'Content-Type': 'application/x-www-form-urlencoded', 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }) }); fetch(request) .then(response => response.json()) .then(function(data) { console.log(); }) .catch(function(error) { });