I am given an absolute URI that contains a query string. I'm looking to safely append a value to the query string, and change an existing parameter.

I would prefer not to tack on `&foo=bar`, or use regular expressions, URI escaping is tricky. Rather I want to use a built-in mechanism that I know will do this correctly and handle the escaping.

I've [found](https://stackoverflow.com/a/17096289/492405) [a](https://stackoverflow.com/q/10232034/492405) [ton](https://stackoverflow.com/questions/11956948/easiest-way-to-parse-querystring-formatted-data) of answers that all use `HttpUtility`. However this being ASP.NET Core, there is no more System.Web assembly anymore, thus no more `HttpUtility`.

What is the appropriate way to do this in ASP.NET Core while targeting the core runtime?