Open
Description
There is an idea to format input parameters as splatting with hash tables.
All original code files from @tiagobalabuch use multiple lines with ` characters.
Example:
$response = Invoke-FabricRestMethod `
-Uri $apiEndpointUrl `
-Method Post `
-Body $bodyJson
New format suggested by @jpomfret :
$apiParams = @{
Uri = $apiEndpointURI
method = 'Post'
body = $bodyJson
}
$response = Invoke-FabricRestMethod @apiParams
Microsoft Learn: about_splatting
These are cosmetic changes and should not impact the current code logic.
Stats:
Method | # used |
---|---|
Invoke-FabricRestMethod ` | 154 |
Invoke-FabricRestMethod @ (hash splatting) | 10 |
Invoke-FabricRestMethod - (one line) | 27 |
Metadata
Metadata
Assignees
Labels
No labels