We shipped a query string parser in System.Net.Http.Formatting.dll, but it didn't make it into the portable System.Net.Http.Formatting.dll implementation because of the dependency on NameValueCollection (see https://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Net.Http.Formatting/UriExtensions.cs). We should ship a portable query string parsing implementation as well as a portable API for creating query strings.
Write two methods:
1. Given Uri or Uri string -> Query string parsed as name value pairs
2. Given a set of name value pair -> Produce a query string that can be used by a UriBuilder
Comments: Verified. There are couple of things about which i have questions though.. 1. Like HttpValueCollection doesn't have an indexer to get values. One has to use Get("") methods to get value of an item. Discussed with Yishai already...need to check with Dan 2. when there are multiple pairs with same key(ignoring the case), when we do a Get("") it gives a comma separated values...not sure if this is good especially if a query string value itself has a comma
Write two methods:
1. Given Uri or Uri string -> Query string parsed as name value pairs
2. Given a set of name value pair -> Produce a query string that can be used by a UriBuilder
Comments: Verified. There are couple of things about which i have questions though.. 1. Like HttpValueCollection doesn't have an indexer to get values. One has to use Get("") methods to get value of an item. Discussed with Yishai already...need to check with Dan 2. when there are multiple pairs with same key(ignoring the case), when we do a Get("") it gives a comma separated values...not sure if this is good especially if a query string value itself has a comma