Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 552 Bytes

File metadata and controls

18 lines (13 loc) · 552 Bytes

Meziantou.Framework.Uri

Meziantou.Framework.Uri provides methods to manipulate URIs.

Parse and edit query strings

var uri = "https://www.meziantou.net";
var query = QueryStringUtilities.ParseQueryString(uri);
var author = query["author"];

_ = QueryStringUtilities.AddQueryString(uri, "name", "value");
_ = QueryStringUtilities.AddOrReplaceQueryString(uri, "name", "value");
_ = QueryStringUtilities.SetQueryString(uri, "name", "value");

// Remove a query string parameter
_ = QueryStringUtilities.AddQueryString(uri, "name", null);