Laravel AJAX POST request is empty
In the awareness that I'm giving my answer here one year later since the last comment, I've stumbled on the some error using Laravel 5.2 and working with XMLHttpRequest
objects: finally I ended to analyze and compare post request headers, which led me to simply setting both:
xmlhttp.setRequestHeader('X-Requested-With', 'XMLHttpRequest');xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=UTF-8');
That solved my empty responseText
.Hope this can help someone else or can be used for future reference.