2019-04-13
|~2 min read
|302 words
The other day, I found myself making some changes to a network request for our application.
By navigating to a specific page, I knew I’d trigger the call, so that’s what I was doing. At some point, I needed some help and one of the more senior engineers made a comment that I could just copy the cURL
into Postman.
I didn’t know what that meant, so I did some digging. Here are the why and how to use Postman for your API testing.
Moving the process to Postman, I get several benefits. The two biggest for me are:
Navigate to the web page that you know will trigger the network call
Open the Dev Tools (The Mac keyboard shortcut for Chrome is ⌘
+ ⌥
+ i
)
Go to the Network tab
Find the request that you’re interested in replicating, and right click on it. The cURL
can be found in Copy> Copy as cURL
Open up Postman
Use Postman’s Import functionality and paste the copied request into the Raw text section, File > Import > Raw Text. (The keyboard shortcut is ⌘
+ o
)
Note, by copying the cURL
, you will also bring in all of your headers - including any authorization that may be necessary.
Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!