When the body of a post request is not a valid JSON string, I encounter an exception. However, the HTTP interface schema says Request can contain any string.
The exception:
"PluginWrapper: invocation exception encountered.\nexception: \"Error parsing JSON: `expected value at line 1 column 1`\""`>
The invocation that produces the exception:
@Test
fun post() {
val result: InvokeResult<Types.Response?> = client.invoke(
uri = uri,
method = "post",
args = Types.ArgsPost(
url = "https://httpbin.org/post",
request = Types.Request(
body = "Hello World!",
responseType = Types.ResponseType.TEXT
)
)
)
assertNull(result.exceptionOrNull())
assertEquals(200, result.getOrThrow()?.status)
}
Additional context:
https://discord.com/channels/796821176743362611/1010304976406454323/1138196489143857277