Karate DSL : Handling proxy

If you are new to Karate DSL, please check this official link.
Also check this link for my articles on the same.

when I was working on a script to call an API which was hosted in China region, I was facing some issues while making request in Karate.

I was getting connection time out error.
While the same request was working fine with postman.

I then posted the question in stackoverflow and Peter Thomas (Developer of Karate), responded so quickly and helped me fix my issue.
It was the issue with my Office proxy which was not allowing the request to go through.

Solution:

I just had to add one line of code in Given section as below to fix this:
* configure proxy = ‘http://myofficeproxyurl:80/’

Leave a Reply