pspete / psPAS

PowerShell module for CyberArk Privileged Access Security REST API
https://pspas.pspete.dev
MIT License
293 stars 91 forks source link

URL Helper #286

Closed pspete closed 4 years ago

pspete commented 4 years ago

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