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
With Giraffe 3.6.0, BindJsonAsync in task CE yields runtime error message "Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead."
#351
Closed
cpbotha opened this issue
Apr 13, 2019
· 3 comments
I've managed to recreate this, it looks like we would need Json.NET to add a DeserializeAsync entry point (they have async readers already) JamesNK/Newtonsoft.Json#1193
Microsoft are also bringing a new fast and async library for working with JSON which would be a good idea to offer too. I'm happy to work on this when it matures.
dustinmoris
added
ready for release
Issue has been already resolved in the development branch
and removed
PR approved
A PR for this issue will get accepted (as long as inline with the comms)
help wanted
Community contribution or any kind of help much appreciated
labels
Aug 24, 2019
In a
POST
handler task CE, the following code yields the error message in the title of this issue:However, by instead following the lead of
BindXmlAsync
's implementation, the following code works perfectly:You can compare the implementations of
BindJsonAsync
andBindXmlAsync
here: https://github.com/giraffe-fsharp/Giraffe/blob/master/src/Giraffe/ModelBinding.fs#L241The text was updated successfully, but these errors were encountered: