jeudi 16 septembre 2021

Getting 302 found in ajax jquery request in laravel

I'm using ajax request in laravel and passing csrf token also but some times my application gets stuck and getting this error :

enter image description here

Code :

  var formData = $(this).serialize();
    $.ajaxSetup({
        header:$('meta[name="_token"]').attr('content')
    });
    $.ajax({
        url:$(this).attr('action'),
        type:'POST',
        data:formData,
        headers: {
            Accept: "application/json"
        },
        success:function(response) {

This form is in modal popup :

 <form id="user-login" class="login" action="" method="post">
 

Any solution, Thanks



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3Cj68Kj
via IFTTT

Aucun commentaire:

Enregistrer un commentaire