laravel fetch post

JavaScript
fetch(url, {   
      	headers: {     
          "Content-Type": "application/json",     
          "Accept": "application/json, text-plain, */*",     
          "X-Requested-With": "XMLHttpRequest",     
          "X-CSRF-TOKEN": token    
        },   
  		method: 'post',
  		credentials: "same-origin",
  		body: JSON.stringify({     name: name,     number: number   })  })
  	.then((data) => {
      		form.reset();       
      		window.location.href = redirect;   
    })  
  	.catch(function(error) {      
      console.log(error);    
    });  
}
Source

Also in JavaScript: