ThePoShWolf/Curl2PS

URL Regex broken

Closed this issue · 2 comments

Hi @ThePoShWolf

I have the following case which throws an error:

$CurlCommand = @"
curl -X GET \
https://PlopServer/identity/api/tenants/Woopa/subtenants \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{token}}'
"@

ConvertTo-IRM -CurlString $CurlCommand

this is the error I get:

image

I actually think have fixed the regex already (on line 13).

The second thing that is a bit disturbing is the 'False' that we can see right above the invoke-restMethod output.

I'll push a PR with the regex fix shortly

Cheers

Without digging into that much, that might also be related to the fact that it hasn't been set up to properly deal with multi-line strings for the $CurlString parameter.

I'm interested to see your fix!

@ThePoShWolf PR is out! ;)