[PowerShell] Fix missing Content-Type header on a 204 response (#19340)

* Allow for binary response content

* AllowNull for $ContentTypes

* Update PSApiClient.ps1
This commit is contained in:
condorcorde 2024-08-13 09:20:46 +02:00 committed by GitHub
parent d340e15f1a
commit e70a9564e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -235,6 +235,7 @@ function DeserializeResponse {
[Parameter(Mandatory)] [Parameter(Mandatory)]
[Object]$Response, [Object]$Response,
[Parameter(Mandatory)] [Parameter(Mandatory)]
[AllowNull()]
[AllowEmptyCollection()] [AllowEmptyCollection()]
[string[]]$ContentTypes [string[]]$ContentTypes
) )

View File

@ -223,6 +223,7 @@ function DeserializeResponse {
[Parameter(Mandatory)] [Parameter(Mandatory)]
[Object]$Response, [Object]$Response,
[Parameter(Mandatory)] [Parameter(Mandatory)]
[AllowNull()]
[AllowEmptyCollection()] [AllowEmptyCollection()]
[string[]]$ContentTypes [string[]]$ContentTypes
) )

View File

@ -239,6 +239,7 @@ function DeserializeResponse {
[Parameter(Mandatory)] [Parameter(Mandatory)]
[Object]$Response, [Object]$Response,
[Parameter(Mandatory)] [Parameter(Mandatory)]
[AllowNull()]
[AllowEmptyCollection()] [AllowEmptyCollection()]
[string[]]$ContentTypes [string[]]$ContentTypes
) )