Closed tobvil closed 4 years ago
Hiyo!
For these, can you do something like:
$params = @{
Uri = $Uri
}
if($PSBoundParameters.ContainsKey('Credential')){
$Params.add('Credential', $Credential)
}
Invoke-RestMethod @params
Otherwise, I think it might not be happy if folks don't specify a credential?
Thanks!
If $Credential is not specified it becomes $Null and will be ignored by Invoke-RestMethod.
But i like your solution better, i've added the changes :)
This will allow users of the module to connect to private nuget repositories which uses basic authentication