Search code examples
resthttpcurlbrowserpostman

http get request works in browser but failed in curl or postman


that's a serverless api running on remote cloud .

It works in browser but failed in curl/postman with error: curl: (55) Send failure: Connection was aborted

when I can tried to copy request as curl in chrome browser, then paste to cmd, it still failed. that means I still failed in curl even use the same request headers in browser.

looks like api-gateway or firewall on cloud blocked the requests from curl/postman but it allowed browser, anyone please can help me for understanding the different of the requests between browser and curl/postman? thanks


Solution

  • Finally I found out the issue was caused by Symantec endpoint protection installed on my PC, it blocked the request since the domain was not contained in company‘s access rule list. however SEP configured the special pass for browsers, so that's why it works in browser but failed in other ways. Disable SEP then issue gone.