Response constructor doesn't accept U+2022 inside body (says invalid character
)
#112
Labels
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
I'm writing a test and for such I need to create a
Response
object to mock the result to an HTTP call.It turns out the JSON I'm using as base for the response body contains a "bullet" character (
•
).When creating the Response manually through
new Response("[...]•[...]", 200)
I get this error:Invalid argument(s): String contains invalid characters.
When the production code access the real webservice and receive the response containing the very same character everything goes fine (maybe because the body is filled from a stream, unlike my case where I do it through a String).
The text was updated successfully, but these errors were encountered: