mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-09 19:03:52 +02:00
Option to disable JSON deserialization (#434)
* Option to disable JSON deserialization * Fix build errors, add test case * make new parameter optional * set default for contentType as well
This commit is contained in:
@@ -243,9 +243,9 @@ namespace WireMock.Net.Tests.RequestMatchers
|
||||
// assign
|
||||
BodyData bodyData;
|
||||
if (body is byte[] b)
|
||||
bodyData = await BodyParser.Parse(new MemoryStream(b), null);
|
||||
bodyData = await BodyParser.Parse(new MemoryStream(b), null, true);
|
||||
else if (body is string s)
|
||||
bodyData = await BodyParser.Parse(new MemoryStream(Encoding.UTF8.GetBytes(s)), null);
|
||||
bodyData = await BodyParser.Parse(new MemoryStream(Encoding.UTF8.GetBytes(s)), null, true);
|
||||
else
|
||||
throw new Exception();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user