ArchGPT / insomnium

Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia
MIT License
3.3k stars 123 forks source link

Importing via CURL seems to strip '=' sign in xml body leading to 400 status error #152

Open aurorabore4lis opened 4 months ago

aurorabore4lis commented 4 months ago

Expected Behavior

Importing a post api call via CURL should return a 201 status. On inspection the first line of xml body in api post request should look as follows: <?xml version="1.0"?>

Actual Behavior

Importing via CURL a post api call currently returns a 400 status error. This is because the first line of xml body of api post request is missing the '=' in <?xml version="1.0"?>

Reproduction Steps

  1. Open up Insomnium and choose to import from Curl via menu item: >_From Curl
  2. Paste your curl api call and hit the Import button.
  3. Inspect the xml body of api post request and note first line of xml body is broken: <?xml version"1.0"?>
  4. Please change it so it is parsed correctly: It should read <?xml version="1.0"?> I have used other REST api applications and I am not getting this issue.

Is there an existing issue for this?

Additional Information

No response

Insomnium Version

Insomnium 0.2.3-a

What operating system are you using?

Windows

Operating System Version

Windows 10 Pro version 22H2

Installation method

https://github.com/ArchGPT/insomnium/releases

Last Known Working Insomnium version

No response

jffhll commented 4 months ago

Yep, I was able to reproduce this issue on the HEAD of the main branch importing the following curl command gave me what's in the screenshot

curl -X GET https://example.org
  -H "Content-Type: application/xml"
  -H "Accept: application/xml"
  -d "<?xml version="1.0"?<test>HELLO</test>"

image