You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using the InvokeEndpoint function with JSON as the body. We believe it arrives at the server double-encoded. I say "we believe" because it's really hard to log what we're seeing and be confident we aren't introducing our own escaping 😅 .
Anyway, I think this is because of the use of postJSON and toJSON body (where body :: Text and contains already-encoded JSON in our case):
We're using the
InvokeEndpoint
function with JSON as thebody
. We believe it arrives at the server double-encoded. I say "we believe" because it's really hard to log what we're seeing and be confident we aren't introducing our own escaping 😅 .Anyway, I think this is because of the use of
postJSON
andtoJSON body
(wherebody :: Text
and contains already-encoded JSON in our case):From the docs, the entire body is meant to be included as itself and is assumed to be in the given
Content-Type
.And, as far as I can tell (I find searching for this stuff difficult), the CLI/python libraries do this:
source
So I think the
body
field should probably beByteString
and sent to the server directly, not viapostJSON
.The text was updated successfully, but these errors were encountered: