EN ES
Home > Web development > Laravel Tutorials > Simulate an Ajax Request in Postman

Simulate an Ajax Request in Postman

Diego Cortés
Diego Cortés
June 16, 2018
Simulate an Ajax Request in Postman

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!

Diego Cortés
Diego Cortés
Full Stack Developer, SEO Specialist with Expertise in Laravel & Vue.js and 3D Generalist

Categories

Page loaded in 36.97 ms