<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.8" />

FormDataCollection

public class FormDataCollection : IEnumerable<KeyValuePair<string, string>>, IEnumerable
Represent the form data. - This has 100% fidelity (including ordering, which is important for deserializing ordered array). - using interfaces allows us to optimize the implementation. E.g., we can avoid eagerly string-splitting a 10gb file. - This also provides a convenient place to put extension methods.
public string this[string name] { get; }

Gets values associated with a given key. If there are multiple values, they're concatenated.

public FormDataCollection(IEnumerable<KeyValuePair<string, string>> pairs)

Initialize a form collection around incoming data. The key value enumeration should be immutable.

public FormDataCollection(Uri uri)

Initialize a form collection from a query string. Uri and FormURl body have the same schema.

public FormDataCollection(string query)

Initialize a form collection from a URL encoded query string. Any leading question mark (?) will be considered part of the query string and treated as any other value.

public string Get(string key)

Get values associated with a given key. If there are multiple values, they're concatenated.

public IEnumerator<KeyValuePair<string, string>> GetEnumerator()

public string[] GetValues(string key)

Get a value associated with a given key.

Get the collection as a NameValueCollection. Beware this loses some ordering. Values are ordered within a key, but keys are no longer ordered against each other.