Request works from Postman but not from cURL

Viewed 19520

I have a pretty simple Postman request that works just fine in Postman. It's just a GET request to the following URL:

http://www.toysrus.com/storefrontsearch/stores.jsp?skuId=24654884&quantity=1&postalCode=48103&latitude&longitude&productId=107531766&startIndexForPagination=0&searchRadius=0&pageType=product&ispu_or_sts=null&displayAllStoresFlag=false&displayAllStoreLink=false

If I ask Postman to make a cURL request out of that for me, it gives me this:

curl -X GET \ 'http://www.toysrus.com/storefrontsearch/stores.jsp?skuId=24654884&quantity=1&postalCode=48103&latitude=&longitude=&productId=107531766&startIndexForPagination=0&searchRadius=0&pageType=product&ispu_or_sts=null&displayAllStoresFlag=false&displayAllStoreLink=false' \ -H 'cache-control: no-cache' \ -H 'postman-token: b4ae79c0-c3f0-8247-8c2f-306c43376039'

The result is that it just hangs forever and never gives me a response.

Any idea what can be done to get the cURL request working?

2 Answers

Beware of the cookie monster

Not all Postman requests are made equal.

Postman will store cookies whether you like it or not (and send them over in subsequent calls to the same domain).

I didn't realize my first call to the same domain was receiving a cookie that was sent back on the next call from Postman. So even though everything looked the same, I wasn't sending the cookie through curl.

Related