I have recently been working on a SMART on FHIR integration with an EHR vendor. One of the REST calls required posting some data and retrieving a launch code. During development, I use Postman to test the functionality. This call kept failing, and I could not figure out why.
After a lot of troubleshooting (including a detailed check of the Postman Console with the complete call), I decided to try the request in cURL and guess what? It worked. HTTP is a relatively simple protocol, so I was astonished that it didn’t work in Postman. Realizing that it was Postman, I tried Paw, which also seems like a great tool. Interestingly, the same call worked OK in Paw as well. The unfortunate thing about Paw is that it’s Mac-only, and I have some folks on our team who prefer Windows.
I like Postman and have never had any issues in the past, so I decided to spend a little more time troubleshooting. After looking around in Postman for a little bit, I noticed an option called “Automatically follow redirects” which was enabled by default. This default choice was a little surprising because generally, you don’t want tools like these to do too much magic.
Just for the heck of it, I disabled this option, and surprisingly the call started working again. The call, in fact, does send back a redirect that had the info that I needed. For development, I needed to see the actual redirect because the new URL wasn’t programmed yet, so, Postman kept showing an empty page! What’s weird is that the redirect doesn’t even show up in the Postman Console. Otherwise, I would have seen it very early on and realized what was going on.
The lesson of the day: turn off “Automatically follow redirects.”