Comments (6)
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.
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.
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.
I love the suggestion. I resembles exactly what it needs to do.
from flurl.
This is now implemented in the latest NuGet package. Thanks again for the suggestion!
from flurl.
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)
- I have injected IFlurlClient and i want to write test for it but it throw null refrence exception? HOT 1
- Bug with multipart boundary field value when re-using the FlurlRequest object HOT 2
- Parsing Empty List result in null instead of empty list HOT 5
- upgrade to Flurl 4.x but keep Flurl.Http at <4 HOT 6
- client.Configure in 4.0.0 version? HOT 8
- Add `bool IFlurlClientCache.TryGet(string name, out IFlurlClient client)` HOT 1
- How can I speed limit when upload file HOT 1
- HttpTest WithRequestJson does not use JsonSerializer set on FlurlClientCache HOT 3
- Deadlock (or something weird) when calling `GetStringAsync` HOT 2
- 4.0.0 HOT 2
- System.EntryPointNotFoundException on PostJsonAsync HOT 1
- Add support for CancellationToken in IFlurlResponse asynchronous methods HOT 1
- Add option to disable conversion of plus signs to spaces for query parameters HOT 3
- According to RFC-7578 the Content-Disposition filename* parameter in multipart MUST NOT be used
- IFlurlClientBuilder.AddMiddleware cuts the chain of delegating handlers HOT 1
- Encode Issue HOT 2
- .net 8 blazor wasm PlatformNotSupportedException HOT 7
- GetJsonAsync<T> is not working after upgrading the Flurl Http to version 4 >= HOT 5
- The response ended prematurely HOT 2
- Trimming unused code causes the exception - Response could not be deserialized to JSON HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flurl.