Error While Importing CURL: Only the URL can be provided without an option preceding it

Hey everyone, this is more of a question with an answer, since I couldn’t find the answer for it here on the site.

When importing a curl command to postman, you may receive the error mentioned above.
Here is an example curl.

curl --location --request POST ‘https://some/long/url/you/need’ \ –header ‘Authorization: Basic abcdefghijklmnop’ \ –header ‘Content-Type: application/json’ \ –data-raw ‘{ “somejson”: "a variable}’

If this type of curl is not importing correctly, you need to remove all instances of \ from the curl command to get it to paste.

I don’t know why an answer to this error isn’t found elsewhere when searching, but hopefully this helps someone else who searches in the future!

I am having same problem. When I click on import and paste my curl code, it’s giving me same error but I didn’t find any place where it’s able to import, can someone tell me where I need to paste my curl if it will not work from import?