'Karate post calls failing for karate.jar 1.X.X versions

I am trying to upgrade from jar version 0.9.6. So far I have tried jar versions 1.0.0, 1.0.1, 1.1.0, 1.2.0RC1.

I am running into a bizarre issue with all the 1.x.x jars. All my tests involving POST calls are failing with an exception. GET calls seem to work fine. Below is the test that I am running and the exception details:

Feature: Add foo

Background: Steps to execute before each scenarios
* url host_url
* configure headers = read(headerfn)

Scenario: Add a foo

* def addfooData = read('addfoo.json')

    Given path fooAddEndpoint
    And request addfooData
    When method POST
    Then status 201

The test fails at the POST call. Below is the exception I get::

Karate version: 1.0.0
======================================================
elapsed:   2.50 | threads:    1 | thread time: 0.45
features:     1 | skipped:    0 | efficiency: 0.18
scenarios:    1 | passed:     0 | failed: 1
======================================================

failed features: status code was: 500, expected: 201, response time in milliseconds: 384,
response: {"message":"An error has occurred.","exceptionMessage":"Error getting value from 'ReadTimeout' on 'Microsoft.Owin.Host.SystemWeb.CallStreams.InputStream'.","exceptionType":"Newtonsoft.Json.JsonSerializationException","stackTrace":" at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)\r\n at

The same test works fine with jar version 0.9.6.

Could someone please throw some light on what I am missing here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source