Manechat / izzy-moonbot

Replacement admin bot for Manechat
https://manechat.net
MIT License
5 stars 4 forks source link

Upgrade Flurl.Http from v3 to v4 by adding Flurl.Http.Newtonsoft at the same time #559

Closed Ixrec closed 8 months ago

Ixrec commented 8 months ago

In Flurl 3, the receiveJson() method has no type parameters, and returns a Task<dynamic>:

image

But in Fluent 4, it's receiveJson<T>() returning a Task<T>, which is why the dependabot PR failed.

Flurl's "Upgrading from 3.x" Guide explains that this is part of a broader move away from dynamic, but if you still want the old behavior, you can install Flurl.Http.Newtonsoft instead.

I doubt any of us are interested in rewriting the Manebooru network request code with stricter typing on stuff we can't possibly guarantee the type of anyway, so I followed that suggestion.