Get KoolPHP UI with 30% OFF!

csrf token posting with AJAX post

Shaun
Hey guys, is there a way to submit a csrf token with an AJAX post using koolajax ?
i.e.
<script type="text/javascript">
$(document).ready(function(){
  $('.send-btn').click(function(){            
    $.ajax({
      url: 'login',
      type: "post",
      data: {'email':$('input[name=email]').val(), '_token': $('input[name=_token]').val()},
      success: function(data){
        alert(data);
      }
    });      
  }); 
});
</script>
Posted Sep 17, 2015 Kool