FortiPower / PowerFGT

PowerShell module to manage Fortinet (FortiGate) Firewall
Apache License 2.0
107 stars 36 forks source link

PS 7.4.2, restmethod.ps1 ContentType application/json #251

Closed jdesl closed 4 months ago

jdesl commented 6 months ago

Hello,

I had to add -ContentType application/json for a quick fix when calling:

get-FGTFirewallAddressGroup -name 'group' -vdom 'master' | Add-FGTFirewallAddressG-memberroupMember 'member' -vdom 'master'

restmethod.ps1 -ContentType application/json

line 199: $response = Invoke-RestMethod $fullurl -Method $method -body (ConvertTo-Json $body -Depth 10 -Compress) -Headers $headers -WebSession $sessionvariable @invokeParams -ContentType application/json

PSVersion 7.4.2 PSEdition Core GitCommitId 7.4.2 OS Microsoft Windows 10.0.22631 Platform Win32NT

alagoutte commented 6 months ago

Duplicate with #246 and #247

I need to publish a new (minor) release...

alagoutte commented 4 months ago

Fixed with release 0.8.1