Importing Insomnia collection containing application/xml requests does not import XML body #3106
Closed
2 tasks done
Labels
bug
Something isn't working
I have checked the following:
Describe the bug
If you export a collection from Insomnia containing requests with application/xml content-type, when you try to import it into Bruno it does not import any of the XML bodies, just their basic details (name, URL, content-type).
The line at fault in packages/bruno-app/src/utils/importers/insomnia-collection.js (177) is:
} else if (mimeType === 'text/xml') {
This needs to check for application/xml as well.
.bru file to reproduce the bug
Insomnia export:
{"_type":"export","__export_format":4,"__export_date":"2024-09-15T20:18:00.106Z","__export_source":"insomnia.desktop.app:v2020.4.2","resources":[{"_id":"req_58601e7a56fe48c39b740bcf3ecf07d3","parentId":"wrk_fd44b3f6bd4a4e94a74d435418625803","modified":1726431071510,"created":1726431011741,"url":"http://localhost:8080/test","name":"Test Application Xml","description":"","method":"POST","body":{"mimeType":"application/xml","text":"\n\t\n\t\txml\n\t\n"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/xml","id":"pair_441915d1ad4d4e2b80383e6fcdba4d04"}],"authentication":{},"metaSortKey":-1726431011741,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_fd44b3f6bd4a4e94a74d435418625803","parentId":null,"modified":1605537859452,"created":1605537859452,"name":"Insomnia","description":"","scope":null,"_type":"workspace"},{"_id":"env_22f3b9571b34a43ba4da1001b7904384cc65f122","parentId":"wrk_fd44b3f6bd4a4e94a74d435418625803","modified":1605537859538,"created":1605537859538,"name":"Base Environment","data":{},"dataPropertyOrder":null,"color":null,"isPrivate":false,"metaSortKey":1605537859538,"_type":"environment"},{"_id":"jar_22f3b9571b34a43ba4da1001b7904384cc65f122","parentId":"wrk_fd44b3f6bd4a4e94a74d435418625803","modified":1605537859543,"created":1605537859543,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"spc_ced55d0d913b42a0a4e9ee0a60ae01d1","parentId":"wrk_fd44b3f6bd4a4e94a74d435418625803","modified":1605537859455,"created":1605537859455,"fileName":"Insomnia","contents":"","contentType":"yaml","_type":"api_spec"}]}
Imported .bru file:
meta {
name: Test Application Xml
type: http
seq: 1
}
post {
url: http://localhost:8080/test
body: none
auth: none
}
headers {
Content-Type: application/xml
}
Screenshots/Live demo link
The text was updated successfully, but these errors were encountered: