New in Symfony 4.1: Ajax improvements

The BrowserKit component used in Symfony functional tests provides lots of
utilities to simulate the behavior of a web browser. In Symfony 4.1 we've added
a new utility to make Ajax requests simpler: xmlHttpRequest().

This method works the same as the current request() method and accepts the
same arguments, but it adds the required HTTP_X-REQUESTED-WITH header
automatically so you don't have to do that yourself: