How to automatically log responses using Flurl v3.0.0

Solution 1:

UPDATE: The fix has been released.


You're correct that in most cases Flurl "captures" deserialized responses so they can easily be read multiple times. But, as I think you came close to concluding, this currently only works when you're deserializing to the same type. If both the event handler and main logic were deserializing to a string, or both to a Post, this should work.

I'm not sure if I'd quite call this a bug (maybe?), but I'm definitely convinced that getting it to work as you're expecting here would be a nice enhancement and not too hard. Please open an issue and I'll look at getting this done in a future release.