I am getting below error when I am trying hit a endpoint url with post method which does not have a body. In postman I am able to hit endpoint url with post method without body. I tried all steps by referring the Karate API docs.
**Error** : com.intuit.karate.exception.KarateException: TestScenarios.feature:56 -
request body is required for a POST, please use the 'request' keyword
testurl is :
**test-api.test.com/test-com/api/check/initiate?
lang=en&cntCode=us&id=8d1b9355**
Attempt 1:
Given url 'test-api.test.com/test-com/api/check/initiate?lang=en&cntCode=us&id=8d1b9355'
When method post
Then status 200
* print response
Attempt 2:
Given url testurl
And param lang= en
And param cCode = us
And param id= '8d1b9355'
When method post
* print 'Response'+response
Attempt 3:
Given url testurl
And form field lang= en
And form field cCode = us
When method post
Then status 200
Can someone help me to understand the issue and wrong in my approach.