insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Latest version unable to parse curl with @ symbol and strips = sign as well

Open thornomad opened this issue 1 year ago • 0 comments

Expected Behavior

Pasting a curl string with an @ symbol in the --data section to parse correctly (as it did in previous version 2022.6.0).

Here is an example simplified curl that will demonstrate the issue:

curl --request POST --url http://localhost:4001/v2 --header 'Content-Type: application/json' --data '{"query":"query Worlds($isIncluded: Boolean = false) {\n worlds {\n id\n label @include(if: $isIncluded)\n }\n}","variables":{},"operationName":"Worlds"}'

Version 2022.6.0 (expected)

Pasted Graphic

Actual Behavior

Version 2023.2.2

The parser appears to terminate and anything after the @ symbol is replaced with the word undefined.

image

Reproduction Steps

  1. Copy the curl sample from expected behavior section
  2. Paste in the address/url bar

Is there an existing issue for this?

Additional Information

I recently upgraded to the latest version and noticed a regression with the paste curl feature (that is, pasting a curl string directly into the address bar).

I think this may be related to issue #5400 (closed) and PR #5409 (closed) but not 100% sure on this.

Insomnia Version

2023.2.2

What operating system are you using?

macOS

Operating System Version

Darwin arm64 22.5.0

Installation method

Internal update

Last Known Working Insomnia version

2022.6.0

thornomad avatar May 30 '23 18:05 thornomad