.NET WireMock reject PostAsJsonAsync serialization
I have a WireMock API setup for testing purposes. First, I was using the short way to make a REST call to my WireMock endpoint:
var response = await _httpClient.PostAsJsonAsync("resorce/someRoute", obj);
This simply didn't work and I always got a "Not Found" response. After a lot of debugging without finding any issues regarding my REST calls and my WireMock setup, I tried the verbose way of doing the same functionality:
var json = new StringContent(JsonSerializer.Serialize(obj),...