msgraph.graph.httphelper

HTTP helpers
License: BSL-1.0.
package(msgraph) @safe string createQueryParam(string[string] params);
Examples:
auto q = createQueryParam(["aaa": "xxx", "ccc": "zzz", "bbb": "yyy"]);
assert(q == "aaa=xxx&bbb=yyy&ccc=zzz");
package(msgraph) @safe string[string] parseQueryParam(string params);
Examples:
auto q = parseQueryParam("aaa=xxx&bbb=yyy&ccc=zzz");
assert(q.length == 3);
assert(q["aaa"] == "xxx");
assert(q["bbb"] == "yyy");
assert(q["ccc"] == "zzz");
package(msgraph) @safe string getRandomString(uint length = 0);
Examples:
auto q1 = getRandomString();
auto q2 = getRandomString();
auto q3 = getRandomString(32);
assert(q1.length >= 64 && q1.length < 128);
assert(q2.length >= 64 && q2.length < 128);
assert(q1 != q2);
assert(q3.length == 32);
assert(q1 != q3);
assert(q2 != q3);