mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Numbers in text/plain content is parsed as JSON. #628
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ruxo on GitHub (Sep 9, 2024).
Describe the bug
I am working with a
PATCHAPI that sends a number as text content using thetext/plainMIME type. However, when the request body is proxied through the WireMock server, the number gets automatically converted into a decimal if it appears in octal (with a leading zero) or hexadecimal format (with a0xprefix).Expected behavior:
I expect the text content with the
text/plainMIME type to remain unprocessed, as-is. Any automatic conversion of the number should only occur if the content type is set toapplication/json.Test to reproduce
Here, a unit test example: