Giter VIP home page Giter VIP logo

Comments (6)

tmenier avatar tmenier commented on July 25, 2024 2

Ok. I think they way I'll support it will look something like this:

url.SetQueryParam("include", new[] { "deleted", "spam", "approved" });

While technically a breaking change, it's highly unlikely to break anyone's implementation, since Flurl currently just does a ToString on whatever value is passed, which is pretty useless in the case of a list or array. Also note that SetQueryParam(s) overwrites if the key exists, so you won't be able to, say, set ["deleted", "spam"] first and then add "approved" in a later call. I could add some kind of support for that later if it's wanted but it feels like overkill for now.

Watch for this in the coming days.

from flurl.

tmenier avatar tmenier commented on July 25, 2024

Interesting case, I haven't run into that before. Perhaps passing an array or list as a query value should result in that behavior by default. I think that seems reasonable, and I'll tentatively add that in the coming days.

In the mean time, did you try using a comma-separated value with Disqus? i.e. include=deleted,spam,approved. That'd work with Flurl today. It's not documented, but you might get lucky.

Thanks for the good suggestion!

from flurl.

stefandevo avatar stefandevo commented on July 25, 2024

I did try that, but it failed. I tried it first with PostManClient to see what exactly was possible, but ended up in providing multiple queryparam values with same key.
Thanks for looking into that!

from flurl.

stefandevo avatar stefandevo commented on July 25, 2024

I love the suggestion. I resembles exactly what it needs to do.

from flurl.

tmenier avatar tmenier commented on July 25, 2024

This is now implemented in the latest NuGet package. Thanks again for the suggestion!

from flurl.

ClassyCircuit avatar ClassyCircuit commented on July 25, 2024

Thank you for implementing this, I have a similar use case.
It would be good if this was documented, at least for the overloaded method you could add a different description.

from flurl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.