Simple POST method is not working in Karate API, which works fine in POSTMAN, getting error as below
ERROR com.intuit.karate - java.net.ConnectException: Connection refused: connect, http call failed after 1101 milliseconds for URL: https://api.stripe.com/v1/customers
It works fine in POSTMAN and browser URL: https://api.stripe.com/v1/customers
I tried with karate-apache / karate-jersey
Feature: Pharmacies Get Default City Code
Background:
* url pharmaciesUrl
@GetPharmaciesByDefaultCity
Scenario: Create New Customers
Given url pharmaciesUrl
And header Content-Type = 'application/x-www-form-urlencoded'
And header Authorization = 'Bearer sk_test_Y566a568oL0lbYwRurOvJ4g6'
Then request {"email": "test1@test.com", "name": "vivek", "description": "Test"}
When method POST
Then status 200
And match response == {id: '#notnull', name: 'vivek'}
Expected: It should create customer with post request which I am passing with status code 200
Actual: Getting below error
09:25:07.278 [main] ERROR com.intuit.karate - java.net.ConnectException: Connection refused: connect, http call failed after 1101 milliseconds for URL: https://api.stripe.com/v1/customers
09:25:07.279 [main] ERROR com.intuit.karate - http request failed:
java.net.ConnectException: Connection refused: connect
pharmacies.feature:12 -`enter code here`
java.net.ConnectException: Connection refused: connect