该RequestUrl
是建立与查询字符串参数,例如URL的帮手:git
var ru = new RequestUrl("https://server/endpoint"); // produces https://server/endpoint?foo=foo&bar=bar var url = ru.Create(new { foo: "foo", bar: "bar" });
做为Create
方法的参数,您能够传入对象或字符串字典。在这两种状况下,属性/值都将序列化为键/值对。github
注意
全部值都将进行URL编码。c#
RequestUrl
在建立用于建模特定于域的URL结构的扩展方法时,它很是有用。有关示例,请参阅Authorize Endpoint和EndSession Endpoint。编码
github地址url