In Play Framework 1.x, we could quickly know if the request was AJAX or not by asking request.isAjax() method, but I can’t find it on Play 2.
What is the alternative or where is this method?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use JQuery for Ajax, it sets the following Request Header:
that you can later access to test if a call is done via Ajax or not.