Is there an tool(Class/Method) in the .NET Framework to transform the urlencoded string body of a Form POSTed like :
Id=O+mon+dieu%21&StringValue=Trop+facile&envoyer=Save
to, for instance, a key-value Dictionary?
{"Id","O mon dieu !"} {"StringValue" , "Trop facile"} {"envoyer", "Save"}
I guest there is a tool like this included…
FYI, it’s to be used in a REST Web service.
The
HttpUtility.ParseQueryStringmethod can take a URL encoded name value pairs and create aNameValueCollectioninstance with the data. It is similar to a dictionary but allows multiple values for a key, which is perfectly legal in your scenario.http://msdn.microsoft.com/en-us/library/ms150046.aspx