mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5465] [bug]: cURL Import Fails When JSON Body Contains Escaped Newlines #2097
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2097
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yousufmunna143 on GitHub (Oct 8, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5465
Is there an existing issue for this?
Platform
Desktop App
Browser
Chrome
Operating System
macOS
Bug Description
Summary:
Importing cURL commands with raw or multiline JSON bodies containing escaped newline characters (
\n) results in an empty request body in Hoppscotch. The same cURL works correctly in Postman.Steps to Reproduce
Copy the following cURL command with a multiline JSON body:
Paste this into the Hoppscotch cURL import tool.
Observe that the request body section is empty.
Expected Behavior
The imported request should populate the body field with the JSON data.
Actual Behavior
Hoppscotch leaves the request body empty.
Postman correctly populates the JSON body when using the same cURL.
Additional Notes
$'...'string syntax with escaped newline characters (\n) inside the JSON.$'...'formatted cURLs.Attachment
https://github.com/user-attachments/assets/295ec4c0-0a85-4fdc-a7ed-f29eeb76f92a
I'm willing to contribute a fix if the team doesn't have bandwidth to address this.
Deployment Type
Hoppscotch Cloud
Version
No response
@nigeldelviero commented on GitHub (Oct 8, 2025):
Can I work on this issue?
@yousufmunna143 commented on GitHub (Oct 22, 2025):
@nivedin @abraham @Sockalingam29 @silentmatt I actively use this feature at work, and this is a blocker for me. I’ve had to open Postman just for this. It’s been more than two weeks since I opened this issue. I’m really interested in working on it, could you please assign it to me?