[Answer]-JQuery won't send HTTP_X_REQUESTED_WITH header?

1👍

There seems to be a closing too much in your code, try this:

<script type="text/javascript">
    $(function() {
        $("#form").on("submit", function(e) {
            e.preventDefault()
            $.post("/members/login/", $("#form").serialize(), function(data){
                console.log(data);
            });
         });
    }); 
</script>
👤adeneo

Leave a comment