Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No multipart form data at body after import from Curl #2663

Open
2 tasks done
PePoDev opened this issue Jul 18, 2024 · 1 comment
Open
2 tasks done

No multipart form data at body after import from Curl #2663

PePoDev opened this issue Jul 18, 2024 · 1 comment
Labels

Comments

@PePoDev
Copy link

PePoDev commented Jul 18, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

I have imported the below curl command into Bruno but it shows no body

curl --location 'https://example.com/api/v1/example' \
--header 'accept: application/json' \
--header 'authorization: Bearer xxxx' \
--header 'baseurl: https://example.com/api/v1' \
--form 'undefined="null"' \
--form 'input="{\"xxxx\":\"xxxx\"}"'

I also imported the same curl command with Postman and it seems to be working properly, not sure what I'm wrong with this

.bru file to reproduce the bug

Import from the above curl command

Screenshots/Live demo link

Bruno

image

Postman

image

@PePoDev PePoDev added the bug Something isn't working label Jul 18, 2024
@adarshlilha
Copy link
Contributor

I happened to debug this issue and found out that bruno is unable to parse CURL properly, even when a curl exported from bruno is imported as curl to create a new req

parseCurlCommand fn in file - parse-curl.js seems to be the root cause here, where yargs fn invocation is missing F: 'form' in alias field
adding form alias parses curl correctly, but data is still not parsed, need few pointers for this flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants