-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuple Support for Headers #536
base: dev
Are you sure you want to change the base?
Conversation
Thanks. I like the idea. There's a few things I'd like to see before accepting this though:
|
Happy to pick those up. That link is very useful as I was slightly
surprised I needed to pull in value tuple. I haven't had to worry about
4.6.x - for quite sometime.
Thanks for the pointers as to other areas that would benefit. I was using
test the other day and noticed that RespondWith and it's overloads might
benefit as well.
…On Thu, 30 Jul 2020, 20:07 Todd Menier, ***@***.***> wrote:
Thanks. I like the idea. There's a few things I'd like to see before
accepting this though:
1.
System.ValueTuple is already included on new platforms, such as .NET
Framework 4.7 and above. I would like the NuGet dependency in the csproj
file to be conditional to only those platforms that need it. I believe this
can be relied upon as a guide:
https://blog.monstuff.com/archives/2017/03/valuetuple-availability.html
(A lot of people use Flurl in Xamarin and Blazor apps and they WILL notice
an unnecessary dependency.)
2.
For consistency, it would be great if tuples were supported everywhere
throughout Flurl where parsing objects to name-value pairs is supported.
This includes query strings, multipart, and cookies. Maybe others. If you
search the code for ToKeyValuePairs it should guide you to those
things.
3.
WithHeaders (and other methods that get new overloads per # 2) should
have equivalent extension methods for Url, Uri, and string, in support
of the various ways you can fluently string together statements.
Flurl.Http.CodeGen should be modified and run to take care of those.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#536 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNQXB5NOGPR7Y5JYPZDE2LR6HAGHANCNFSM4PFSVDKA>
.
|
Yes, funny you mention that about RespondWith. I tried to write a test involving multiple Another thing I should mention is that this wouldn't get released before 3.0, and as part of that I may re-evaluate which platforms/versions I want to continue to support going forward. That could have some impact on if/how to include |
More than happy to work on this together and a few days would suit me
better too. Just shout when it works and we can coordinate. Probably better
to move to a better coms platform in that case. Slack, WhatsApp a.n.other
just let me know.
…On Thu, 30 Jul 2020, 23:58 Todd Menier, ***@***.***> wrote:
Yes, funny you mention that about RespondWith. I tried to write a test
involving multiple Set-Cookie headers and that's not so easy - tuples
would work great. I've actually started modifying some of the internals of
ToKeyValuePair to make special accommodations for IEnumerable<ValueTuple>.
So we might end up working on this together. Can you hold off a few days?
Another thing I should mention is that this wouldn't get released before
3.0, and as part of that I may re-evaluate which platforms/versions I want
to continue to support going forward. That could have some impact on if/how
to include System.ValueTuple as well. Another reason to consider holding
off a bit - I should have an answer on that soon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#536 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNQXBYBRRGRUG3WD5CRPBTR6H3IDANCNFSM4PFSVDKA>
.
|
Headers to allow the passing of tuples along these lines:
request.WithHeaders(("Accept", "application/json"), ("host", "localhost"), ("etc", "etc"))