Hello!, while developing our web applications or API development, it is very common to use Postman as an indispensable tool to test our endpoints, regardless of the language in which we work on our project or framework such as Laravel in my case.
Let's get to what interests us: How to simulate an AJAX request in Postman? :D, in Postman we can simulate that an endpoint is actually an Ajax request, either to see the different behavior of an endpoint depending on whether or not it is an AJAX request, for them the only thing we have to do is add two headers to our request:
Content-Type application/json X-Requested-With XMLHttpRequest
I'm leaving you a screenshot so you can understand it better 😀
I hope it helps you and your workflow benefits from this!
Page loaded in 36.97 ms