ThePoShWolf/Curl2PS

Impossibile convertire il valore "curl -F 'myfile=@upload.txt'"

johnkernel opened this issue · 1 comments

curl command

curl -F 'myfile=@upload.txt' -F 'var=123456' https://mysite.org

Current Behavior

It seems not to accept the -F parameter

Steps to Reproduce (for bugs)

$CurlString = @"
curl -F 'myfile=@upload.txt' -F 'var=123456' https://mysite.org
"@
ConvertTo-IRM $CurlString -String

Your Environment

Name Value


PSVersion 5.1.19041.610
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.610
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

ModuleType Version Name ExportedCommands


Script 0.0.3 Curl2PS {ConvertTo-IRM, Get-CurlCommand, Get-URLData}

Looks like -F is a multipart form. PowerShell 7 appears to support forms out of the box, but I'm not sure about 5.1. I'll do some further investigation.