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

feat: import cURL on paste #2037

Merged
merged 3 commits into from
Dec 22, 2021
Merged

feat: import cURL on paste #2037

merged 3 commits into from
Dec 22, 2021

Conversation

anwarulislam
Copy link
Member

Closes #

Description

I've updated the code which contains the feature: now you can copy a cURL from the network console of the browser or from anywhere and paste it to the URL field then it will automatically recognize the cURL format. And will generate the request.

Checks

  • My pull request adheres to the code style of this project
  • All the tests have passed

Additional Information

@netlify
Copy link

netlify bot commented Dec 22, 2021

👷 Deploy request for hoppscotch pending review.
Visit the deploys page to approve it

🔨 Explore the source changes: 5672aaa

@liyasthomas
Copy link
Member

cc: @AndrewBastin

@lgtm-com
Copy link

lgtm-com bot commented Dec 22, 2021

This pull request introduces 2 alerts and fixes 1 when merging 1bbae72 into 10586e5 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

fixed alerts:

  • 1 for Unused variable, import, function or class

@AndrewBastin AndrewBastin self-requested a review December 22, 2021 14:14
Copy link
Member

@AndrewBastin AndrewBastin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anwarulislam It's a really neat idea!

But, I am not exactly a big fan of the implementation, it would also be cool if we could preserve the line breaks as well (if the curl paste has multiple lines, it becomes a single line). in the Import Curl modal Also it would be cool if the pasted curl string doesn't appear on the URL field.

Would love your thoughts.

packages/hoppscotch-app/components/http/ImportCurl.vue Outdated Show resolved Hide resolved
packages/hoppscotch-app/components/http/ImportCurl.vue Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Dec 22, 2021

This pull request introduces 1 alert and fixes 1 when merging 5672aaa into 10586e5 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

fixed alerts:

  • 1 for Unused variable, import, function or class

@anwarulislam
Copy link
Member Author

@AndrewBastin I've changed these things from the last review:

  • using curlText variable for passing data to ImportCurl.vue component as prop.
  • removed setTimout
  • making URL field empty if it's curl after pasting
  • and also supports multiline text. make sure you copied the text as multiline

@AndrewBastin
Copy link
Member

yup, can see that. reviewing it right now 🤣

@lgtm-com
Copy link

lgtm-com bot commented Dec 22, 2021

This pull request introduces 1 alert and fixes 1 when merging af68974 into 10586e5 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

fixed alerts:

  • 1 for Unused variable, import, function or class

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

Successfully merging this pull request may close these issues.

None yet

3 participants