Skip to content

Commit

Permalink
fix: Send-HueBridge ContentType ( Fixes #116 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Apr 29, 2024
1 parent 10742ee commit 52df964
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Commands/Hue/Send-HueBridge.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ function Send-HueBridge

#region Invoke-RestMethod and decorate resultsa
Write-Verbose "Sending command to $($splat.Uri)"
if ($splat.Method -ne 'GET' -and -not $splat.ContentType) {
$splat.ContentType = 'application/json'
}
$invokeResult = Invoke-RestMethod @splat 2>&1
# Always add a HueUserName and IPAddress to each result
$userNameNoteProperty = [PSNoteProperty]::new('HueUserName', $HueUserName)
Expand Down

0 comments on commit 52df964

Please sign in to comment.