Adds ConvertTo-QueryString, a new helper function which formats a provided hashtable as query string for use in urls.
Replaces repeated code in various module functions.
Adds logic to only include query in URLs if there is a value assigned to the variable holding the query. Prevents a trailing ? when no value is present.
Test Plan
All existing pester tests pass.
Invocation of updated functions shows no change in existing module operation
Summary
Adds
ConvertTo-QueryString
, a new helper function which formats a provided hashtable as query string for use in urls. Replaces repeated code in various module functions. Adds logic to only include query in URLs if there is a value assigned to the variable holding the query. Prevents a trailing?
when no value is present.Test Plan
All existing pester tests pass. Invocation of updated functions shows no change in existing module operation