While working on my project, I decided to utilize URI.js for parsing and constructing URLs. Unfortunately, the documentation provided by URI.js did not offer sufficient examples for me to easily follow. When attempting to build a URL as follows:
// expected output: Admin.aspx?controller=login&action=submit
var url = URI.build({
path: "Admin.aspx",
query: {
controller: "login",
action: "submit"
}
});
// actual result: Admin.aspx
I found that the output was not what I had anticipated. Can anyone provide guidance on how to correctly use URI.js to achieve this desired outcome?