File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -971,15 +971,15 @@ $outputObject = New-Object PSObject -Property $output |
971971
972972 # To add to the fun, we want our functions to take parameters
973973 $FormData = . $site.GetFunctionFormData.GetNewClosure () $request.Url $body $request.ContentType
974-
975- $query = [Ordered ]@ {} + $FormData
976974
975+ $jsonData = [Ordered ]@ {}
977976 # If the method is POST and we can read input
978977 if ($body -and $request.ContentType -eq ' application/json' ) {
978+ Write-Warning $body
979979 $parsedBody = ConvertFrom-Json - InputObject $body
980980 foreach ($property in $parsedBody.psobject.properties ) {
981981 if (-not $property ) { continue }
982- $query [$property.Name ] = $parsedBody .($property.Name )
982+ $jsonData [$property.Name ] = $parsedBody .($property.Name )
983983 }
984984 }
985985
@@ -1005,7 +1005,11 @@ $outputObject = New-Object PSObject -Property $output |
10051005 $functionParameters = [Ordered ]@ {}
10061006
10071007 # Go over every source of potential named parameters,
1008- foreach ($namedParameters in $FormData , $pathParameters.BoundParameters ) {
1008+ foreach ($namedParameters in
1009+ $FormData ,
1010+ $jsonData ,
1011+ $pathParameters.BoundParameters
1012+ ) {
10091013 if (-not $namedParameters ) { continue }
10101014 # walk over each parameter name in the set,
10111015 foreach ($parameterName in $namedParameters.Keys ) {
You can’t perform that action at this time.
0 commit comments