[TestMethod]
public void ServiceStackSetQueryParamWorksWhenMatchingParameterIsSubsetOfKey()
{
var url = "http://www.google.com?PageSize=25".SetQueryParam("Page", "1");
Assert.AreEqual("http://www.google.com?PageSize=25&Page=1", url);
}
The above test case fails. Instead I end up with ?Page=1 in the querystring, with PageSize being eliminated. I’m on v4.x of SS (can’t update to 5 just yet).
The query param might already exist. So now you want me to check if it exists and use Add instead in those cases, and Set (which will still do it wrong) in others? I don’t think that solution changes the fact that the Set method is wrong.