mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
18 lines
376 B
PowerShell
18 lines
376 B
PowerShell
|
|
function Get-IcingaRESTHeaderValue()
|
||
|
|
{
|
||
|
|
param(
|
||
|
|
[hashtable]$Request = @{},
|
||
|
|
[string]$Header = $null
|
||
|
|
);
|
||
|
|
|
||
|
|
if ($null -eq $Request -or [string]::IsNullOrEmpty($Header) -Or $Request.Count -eq 0) {
|
||
|
|
return $null;
|
||
|
|
}
|
||
|
|
|
||
|
|
if ($Request.Header.ContainsKey($Header) -eq $FALSE) {
|
||
|
|
return $null
|
||
|
|
}
|
||
|
|
|
||
|
|
return $Request.Header[$Header];
|
||
|
|
}
|