You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected - when creating contracts, we should be able to not set the response['headers']['Content-Type'] and it shouldn't be defaulted to 'application/json'
Actual - Even when we don't specify .withResponseHeaders() function, the contract has
"response": {
"headers": {
"Content-Type": [
"application/json;charset=UTF-8"
]
},
Steps:
We use pact for c++ api to write our contracts ..
sample code for generating contract
m_pact.given("some provider state")
.uponReceiving("a request to xxx")
.withRequest("POST", "/abc")
.withJsonBody(requestMatcher)
.willRespondWith(200)
.withResponseJsonBody(responseMatcher);
We expect this not to set a default response['headers']['Content-Type']
and we should explicitly be setting it ..
The text was updated successfully, but these errors were encountered:
Expected - when creating contracts, we should be able to not set the response['headers']['Content-Type'] and it shouldn't be defaulted to 'application/json'
Actual - Even when we don't specify .withResponseHeaders() function, the contract has
"response": {
"headers": {
"Content-Type": [
"application/json;charset=UTF-8"
]
},
Steps:
We use pact for c++ api to write our contracts ..
sample code for generating contract
m_pact.given("some provider state")
.uponReceiving("a request to xxx")
.withRequest("POST", "/abc")
.withJsonBody(requestMatcher)
.willRespondWith(200)
.withResponseJsonBody(responseMatcher);
We expect this not to set a default response['headers']['Content-Type']
and we should explicitly be setting it ..
The text was updated successfully, but these errors were encountered: