-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Convert curl commands to request. #338
Comments
+1 In addition, an "Import from curl" option on the directory menu (next to "New request") should be added, to make it obvious that Bruno has this feature. |
If you can't export to curl, that would also be great to have added. Apologies if it's already a feature, I couldn't see any obvious place in the docs that point that out & GOOG simply pointed me here. |
@sanskar-mk2 @helloanoop @cvmocanu I'll start working on this issue. |
A quick update, I'm through with the changes for this and is currently working on a bug while updating headers from the curl command. |
Would love to see a teaser video :) |
New.request.from.cURL.mp4@helloanoop Here is what it looks like now. Please pass on review comments. |
Curl Import functionality is now available in |
@helloanoop it would be good to also have a curl script generated on an existing request. Postman has this feature and it is very handy to show the output of an API call |
@girishkumar9 that is already implemented: hover your mouse cursor over a request in the left-side tree, click the 3 dots, Generate Code, Shell-Curl. |
On Apple M1 Pro with Ventura 13.5.2- All attempts to use the create new request with curl error out. Window with error disappears to quickly to copy the error. |
Unfortunately it doesn't work properly with variables. I have the base url in an environment variable and the export doesn't recognize the url. Edit: the problem seems to be that I used "." in the variable names |
@helloanoop I was trying to import a curl but the request url is not properly appearing in the URL field, I tried multiple times, different URLs are coming. is there any debugger or someway that I can see what might be causing it? I tried importing from the collection tab(sidebar) and also in the request window(by clicking on '+'). |
I kind of need to re-import from curl on an existing request. Making a new request for every time I want to import curl is really unwieldy. |
Your Bash parser doesn't handle ANSI-C quoted strings, which browsers output when generating curl when some part of the request (namely the body) contains a control character, a non ASCII character or a single quote. You can use https://www.npmjs.com/package/shlex which does |
Just found Bruno. Really like it but I wish import from cURL was a little easier for when I need to do it repeatedly. A keyboard shortcut would go a long way. Or a magic textbox that recognizes when the pasted string starts with "curl " and does the right thing. To make this really seamless would be nice if the request name was optional or auto-generated. Thanks for creating this tool! |
It would be nice if it wasn't so many clicks in. In Insomnia pasting a curl command into the url bar would prompt you to import it as a new request. It also had import from curl as an option from under the add menu directly. |
Yeah. When working as QA I need to import a lot of curl requests during the day, just to make some minor adjustments and run them. I don't want to create and save a new request in my collection each time I just want to import something from my browser. Like stated before, both Insomnia and postman "overwrite" the current request when you paste a curl script right into the URL bar. Would love to have the same functionality in Bruno |
Closing this issue since the core functionality for importing Curl has been implemented. Additionally, the Curl importer has seen several updates over the past few months. If you have suggestions for improvements, please feel free to raise a new issue with specific details. |
I think there is a problem, for example I put the curl below |
In Insomnia, whenever you post a curl request to the url bar, it autofills the headers/url/parameters/creds accordingly to that curl request. It is very important feature since curl is very universal to http requests. You can copy curl directly from browser.
The text was updated successfully, but these errors were encountered: