Insomnia: [Feature Request] Export and import requests as curl.

Created on 28 Jun 2017  路  5Comments  路  Source: Kong/insomnia

Overview

Chrome browser has a feature to copy a request as curl. It would be great if it was possible to then import this request into insomnia and have all of the fields populated. And it would be great if it was possible to get the same export feature as in chrome, right click on request in insomnia and choose copy as curl.

Most helpful comment

Well @Euphorbium, I have good news for you. Both of these are already possible!

You can import a Curl command by pasting it into the current request's URL bar, and you can export as curl using the Generate Code feature.

image

Let me know if you have any questions.

All 5 comments

Well @Euphorbium, I have good news for you. Both of these are already possible!

You can import a Curl command by pasting it into the current request's URL bar, and you can export as curl using the Generate Code feature.

image

Let me know if you have any questions.

@Euphorbium any ideas on how to make that feature more obvious?

@gschier The new request window could have an info bubble, as many places have and hovering on it should inform you, that you can paste a curl request. Because currently that is a completely unexpected and undocumented feature.
And for the exporting, I have never pressed on generate code, and in my mind I do not consider a curl command code, so that is why I did not look for it there. But that is probably good as is.

Pasting Curl is referenced in the Data tab in Preferences. It might be worth having a dedicated button during the "Create Request" flow to paste a curl command, though.

image

Also, that's a good point about curl not being code. I agree with that statement as well.

Just added a couple things

image
image

Was this page helpful?
0 / 5 - 0 ratings