mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #5013] [bug]: Import cURL parameter Incorrect #1907
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#1907
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 @farrywen on GitHub (Apr 22, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5013
Originally assigned to: @shuaixr on GitHub.
Is there an existing issue for this?
Current behavior
When I import a request via cURL, the parameter names and values are messed up and cannot be matched.
Steps to reproduce
I imported cURL as follows:
curl --request POST \ --url https://api.stripe.com/v1/accounts/acct_1RAlgzRwv8GWMpvL \ --header 'Accept: */*' \ --header 'Accept-Encoding: gzip, deflate, br' \ --header 'Authorization: Basic c2tfdGVzdF81MVBKakxMUnVuVUV0Q1lHWHFmYWJpYU9ielAzYUJvSUJvU0hVeGtFUWlQWTZjcnBKVm5vVktKOUh0cVBONzBpYVN6QUZkeUVtM2tRZDV0dFNYWXpTcEY1aDAwczlXWW85Q1g6' \ --header 'Connection: keep-alive' \ --header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \ --data 'individual[first_name]=John' \ --data 'individual[last_name]=Doe' \ --data 'individual[email]=ray.arrakis@gmail.com' \ --data 'individual[phone]= +639615051036' \ --data 'individual[dob][day]=15' \ --data 'individual[dob][month]=6' \ --data 'individual[dob][year]=1990' \ --data 'individual[address][line1]=123 Main Street' \ --data 'individual[address][city]=London' \ --data 'individual[address][state]=London' \ --data 'individual[address][postal_code]=EC1Y8SY' \ --data 'individual[address][country]=GB' \ --data business_type=individual \ --data 'business_profile[product_description]=Ticket resale' \ --data 'business_profile[mcc]=7922' \ --data 'tos_acceptance[date]=1743825911' \ --data 'tos_acceptance[ip]=154.64.226.44'The parameters after import are as follows :
The parameter names and values are all messed up.
Logs and Screenshots
Environment
Production
Hoppscotch Version
Local
Interceptor
Not Applicable - Issue not related to network requests
Browsers Affected
No response
Operating System
Windows
Additional Information
No response
@shuaixr commented on GitHub (May 2, 2025):
@jamesgeorge007 I would like to work on this
Add -H "Content-Type: application/x-www-form-urlencoded" to the curl command can fix this error.
According to the curl documentation, when using the -d option for POST requests, curl automatically includes the Content-Type: application/x-www-form-urlencoded header.
Hoppscotch doesn't account for this, which I believe is a bug.
@jamesgeorge007 commented on GitHub (May 2, 2025):
Feel free to raise a PR :)
@jamesgeorge007 commented on GitHub (May 8, 2025):
This is resolved in the latest release. Please feel free to let us know if you have any feedback.