Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

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

Open
1 task done
aurorabore4lis opened this issue Feb 16, 2024 · 1 comment · May be fixed by #155
Open
1 task done

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

aurorabore4lis opened this issue Feb 16, 2024 · 1 comment · May be fixed by #155

Comments

@aurorabore4lis
Copy link

aurorabore4lis commented Feb 16, 2024

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
Copy link
Contributor

jffhll commented Feb 22, 2024

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

jffhll added a commit to jffhll/insomnium that referenced this issue Feb 22, 2024
@jffhll jffhll linked a pull request Feb 22, 2024 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants