right, I did also specify to use CamelCase in my p...
# pact-net
g
right, I did also specify to use CamelCase in my pact request:
Copy code
.WithJsonBody(product,new JsonSerializerSettings { ContractResolver=new CamelCasePropertyNamesContractResolver()})
It's still complaining about case mismatch. how do I tell Pact to send the json in Camcelcase
this issue was resolve when I used custom Json Serializer settings in the ApiClient class
Copy code
public class ApiClient 
    {
        private readonly HttpClient httpClient;

        private readonly JsonSerializerSettings jsonSettings = new JsonSerializerSettings
        {
            ContractResolver = new CamelCasePropertyNamesContractResolver(),
        };
}
and use custom Json Serializer settings when searializing the request
Copy code
var requestContent = new StringContent(JsonConvert.SerializeObject(request,jsonSettings), Encoding.UTF8, "application/json");
            var httpResponse = await httpClient.PostAsync("api/create", requestContent);