Portable Class Library (PCL) Version Of HttpUtility.ParseQueryString

后端 未结 4 1252
天命终不由人
天命终不由人 2021-02-12 23:18

Is there a Portable Class Library (PCL) version Of HttpUtility.ParseQueryString contained in System.Web or some code I could use? I want to read a very complex URL.

4条回答
  •  离开以前
    2021-02-12 23:47

    I made a nuget package today that does basic query building and parsing. It's made for personal usage but available from the nuget.com repo. For personal usage means it may not be fully compliant with the 'http query specs'. Nuget link here

    It's based on a dictionary so doesn't support duplicate keys, mainly because I don't know why you would want that... (can anyone enlighten me?)

    It has 1 class representing a query that supports adding, getting parameters, checking if it contains a key... And a static method to parse a key and return a query instance.

提交回复
热议问题