Introduce support for nested objects
At work, we encountered a case where we have contract classes (DTOs) containing another DTOs, being nested objects. It seemed that Flurl doesn't support this currently, while e.g. ASP.NET MVC model binder can correctly deserialize them from GET query parameters.
Hence the PR, introducing support for serializing nested object by composing property names using a dot.
By the way, I modified can_set_timeout_and_cancellation_token test to expect OperationCancelledException instead of TaskCancelledException, because it simply wouldn't pass on my machine otherwise. I'm not entirely sure that's correct, but it seems reasonable since OperationCancelledException is a base class and also represents cancellation.
Thanks, it's an interesting idea and I'll give it some thought. It is of course a breaking change for anyone expecting custom objects to get ToString'd. An alternative might simply be a SetQueryParamNested extension method for your own usage. I'd recommend that as a way forward for now.
Is this related to an open issue? If not, could you create one? Otherwise I tend to forget about PRs. And generally, I prefer discussing new features first per the contribution guidelines, just so you don't risk doing a bunch of wasted work.
Created https://github.com/tmenier/Flurl/issues/457