insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Curl import is not working if the body data has email address with @ symbol

Open dlsivakumar99 opened this issue 1 year ago • 4 comments

Expected Behavior

Curl import "From Curl..." should properly import this curl if the body data has email address with @ symbol

curl -X PUT
'https://testhost.com'
-H 'accept: /'
-H 'true-client-ip: 143.160.96.238'
-H 'content-type: application/json'
-d '{ "caller_id_user_name": "abel.tuter", "location_street": "", "short_description": "testing ", "AttachmentFileContents": "", "correlation_id": "0000002532343881", "number": "INC0010001", "caller_id": "Abel Tuter", "opened_by_email": "[email protected]", "work_notes": "A regular new update", "caller_id_email": "[email protected]", "location_city": "", "X_reqLoc": "wywHC8Wp" }'

Actual Behavior

Curl imported body is getting truncated at the @ symbol if the body data has email address. See the image. image

The Curl that's imported: curl -X PUT
'https://testhost.com'
-H 'accept: /'
-H 'true-client-ip: 143.160.96.238'
-H 'content-type: application/json'
-d '{ "caller_id_user_name": "abel.tuter", "location_street": "", "short_description": "testing ", "AttachmentFileContents": "", "correlation_id": "0000002532343881", "number": "INC0010001", "caller_id": "Abel Tuter", "opened_by_email": "[email protected]", "work_notes": "A regular new update", "caller_id_email": "[email protected]", "location_city": "", "X_reqLoc": "wywHC8Wp" }'

The truncated body after the Import: { "caller_id_user_name": "abel.tuter", "location_street": "", "short_description": "testing ", "AttachmentFileContents": "", "correlation_id": "0000002532343881", "number": "INC0010001", "caller_id": "Abel Tuter", "opened_by_email": "adminundefined

Reproduction Steps

  1. Copy the Curl that needs to be imported in Insomnia to Clipboard curl -X PUT
    'https://testhost.com'
    -H 'accept: /'
    -H 'true-client-ip: 143.160.96.238'
    -H 'content-type: application/json'
    -d '{ "caller_id_user_name": "abel.tuter", "location_street": "", "short_description": "testing ", "AttachmentFileContents": "", "correlation_id": "0000002532343881", "number": "INC0010001", "caller_id": "Abel Tuter", "opened_by_email": "[email protected]", "work_notes": "A regular new update", "caller_id_email": "[email protected]", "location_city": "", "X_reqLoc": "wywHC8Wp" }'
  2. Go to a Collection in Insomnia
  3. Click on From Curl at the Request level [or Import at the Workspace level and select Clipboard]
  4. Check the body of the Request.

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2023.5.4

What operating system are you using?

Windows

Operating System Version

Version: Insomnia 2023.5.4 Build date: 8/18/2023 OS: Windows_NT x64 10.0.22000 Electron: 25.2.0 Node: 18.15.0 Node ABI: 116 V8: 11.4.183.23-electron.0 Architecture: x64

Installation method

Download from insomnia.rest

Last Known Working Insomnia version

No response

dlsivakumar99 avatar Aug 18 '23 17:08 dlsivakumar99

This is really anoying as I have to always remember to remove the @ on curls now.

GentSad avatar Oct 16 '23 12:10 GentSad

Hi there, we are facing this issue as well and would love to see it resolved as it's blocking our users. Is there any timeline for its resolution?

Thank you.

Agathe-Brusset avatar Feb 28 '24 10:02 Agathe-Brusset

LOL, i wasnt expecting that it was a error with import, but was.

JuninhoFreitas avatar May 18 '24 01:05 JuninhoFreitas

Any update on this issue? I am still experiencing it on 9.3.3.

achoboter avatar Sep 05 '24 20:09 achoboter