Flurl icon indicating copy to clipboard operation
Flurl copied to clipboard

Tuple Support for Headers

Open eldonferranpol opened this issue 5 years ago • 2 comments

Intending to put in a pull request for headers to allow for the passing of tuples something along these lines:

request.WithHeaders(("Accept", "application/json"), ("host", "localhost"), ("etc", "etc"))

eldonferranpol avatar Jul 23 '20 08:07 eldonferranpol

(Pulling over some notes from https://github.com/tmenier/Flurl/pull/536.)

Need to evaluate what other areas might benefit from this. Possibilities:

  • SetQueryParams
  • WithHeaders
  • WithCookies
  • AddStringParts (multipart)
  • Various things in HttpCallAssertion

Searching for ToKeyValuePairs is a good way to identify candidates. This doesn't necessarily mean it needs to be added everywhere. Not a breaking change so this doesn't need to get out for 3.0.

tmenier avatar Sep 30 '20 02:09 tmenier

Still like this idea but in the interest of time it won't make the initial 4.0 cut. Possibly 4.1.

tmenier avatar Sep 12 '23 20:09 tmenier