Getting "Error while importing Curl: Please check your cURL string for malformed URL" when trying to paste as raw text by copying as cURL

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Here’s an outline with best practices for making your inquiry.

My question:
Getting “Error while importing Curl: Please check your cURL string for malformed URL” when trying to paste as raw text by copying as cURL

Details (like screenshots):

How I found the problem:
While copy paste curl (v9.25.1)

I’ve already tried:

Hi @spaceflight-enginee4

There isn’t much information to go off here…
Can you copy in your curl command or screenshot what you are seeing?

1 Like

Please find the attached screenshot here

Steps i tried to perform is

intercept api call from any browser->Right click on api call->copy as cURL->Go to postman(Version 9.25.1)->Import->paste as raw text
Find below cuRL which im trying to import

curl 'https://dashboard.webengage.com/user/account.html?action=forgot' -X POST -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' -H 'Accept-Language: en-GB,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://dashboard.webengage.com/user/account.html?action=viewForgot' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://dashboard.webengage.com' -H 'Connection: keep-alive' -H 'Cookie: _gcl_au=1.1.1986184960.1657088792; _ga_3NGD3E18DP=GS1.1.1658399710.9.1.1658402356.40; _ga=GA1.2.1335907703.1657088792; _fbp=fb.1.1657088793592.1171718870; _lfa=LF1.1.95970d176bb673c4.1658374747421; OptanonConsent=isIABGlobal=false&datestamp=Thu+Jul+21+2022+16%3A48%3A56+GMT%2B0530+(India+Standard+Time)&version=6.17.0&hosts=&consentId=e9ac56bd-9e04-499d-9368-bdd3e08bc1fe&interactionCount=1&landingPath=https%3A%2F%2Fwebengage.com%2F&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1%2CC0004%3A1%2CC0005%3A1; AWSALB=ZbklkJFuch+wycjcXTKO9BCwzmoLZ9JbRSqg0M5wC+tgWTnEOAEMCRliCpPTbSGDYMoQx3/1Qzjpnr/phs/ZKSmI31KDz0uPAsvLpUqU9Zs0cyP5Yh7euA19wiRhUT20YWM4yBqw2ReDe3JNVMWUXxmlCQTRTnwO+meL/D4N2m5Ys4T3g9cUlWsneQPHEQ==; AWSALBCORS=ZbklkJFuch+wycjcXTKO9BCwzmoLZ9JbRSqg0M5wC+tgWTnEOAEMCRliCpPTbSGDYMoQx3/1Qzjpnr/phs/ZKSmI31KDz0uPAsvLpUqU9Zs0cyP5Yh7euA19wiRhUT20YWM4yBqw2ReDe3JNVMWUXxmlCQTRTnwO+meL/D4N2m5Ys4T3g9cUlWsneQPHEQ==; _we_a_ssid=aaaR9Idsjad9T7_-9IBiy; _gid=GA1.2.735761338.1658374750; WebKlipperAuth=jz7SgX3zBNIMPRMGg5ni; _we_us=1658399711602; __adroll_fpc=98d019a6a7383b98d97c93bac311483a-1658399802896; __ar_v4=2II4J53FLRDUBGIZDUKWME%3A20220720%3A2%7C3GK5HOPAS5HOHC3TUOQ4X3%3A20220720%3A2%7CPOFEMBENINHV3FI44SIJLG%3A20220720%3A2; _clck=6qc1e8|1|f3c|0; _clsk=1x5o9dz|1658399803906|1|1|d.clarity.ms/collect; _uetsid=acc0897008a611edabba99d25eca0ad4; _uetvid=acc0773008a611eda9d601390f5ab28e; _gat_UA-28285682-1=1; drift_campaign_refresh=fa0834fd-34c3-445d-a141-91db4634cbfa' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-User: ?1' -H 'TE: trailers' --data-raw 'url=&source=&authParams=&OWASP_CSRFTOKEN=UHOV-7ELJ-Z7IY-5K80-RZ1G-YAHL-AUTB-4FQC&un=pritesh.pednekar%2B6%40webengage.com&active_region=us&we_region=us'

Are you copying as curl cmd or bash?
You should copy it as curl bash.
image

Note: make sure you are not selecting “copy all as”


If I put your curl command into this site:

It lets me output as curl bash and then I can import it into Postman.

The converted curl is;

curl -X POST https://dashboard.webengage.com/user/account.html?action=forgot -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Firefox/102.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" -H "Accept-Language: en-GB,en;q=0.5" -H "Accept-Encoding: gzip, deflate, br" -H "Referer: https://dashboard.webengage.com/user/account.html?action=viewForgot" -H "Content-Type: application/x-www-form-urlencoded" -H "Origin: https://dashboard.webengage.com" -H "Connection: keep-alive" -H "Cookie: _gcl_au=1.1.1986184960.1657088792; _ga_3NGD3E18DP=GS1.1.1658399710.9.1.1658402356.40; _ga=GA1.2.1335907703.1657088792; _fbp=fb.1.1657088793592.1171718870; _lfa=LF1.1.95970d176bb673c4.1658374747421; OptanonConsent=isIABGlobal=false&datestamp=Thu+Jul+21+2022+16%3A48%3A56+GMT%2B0530+(India+Standard+Time)&version=6.17.0&hosts=&consentId=e9ac56bd-9e04-499d-9368-bdd3e08bc1fe&interactionCount=1&landingPath=https%3A%2F%2Fwebengage.com%2F&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1%2CC0004%3A1%2CC0005%3A1; AWSALB=ZbklkJFuch+wycjcXTKO9BCwzmoLZ9JbRSqg0M5wC+tgWTnEOAEMCRliCpPTbSGDYMoQx3/1Qzjpnr/phs/ZKSmI31KDz0uPAsvLpUqU9Zs0cyP5Yh7euA19wiRhUT20YWM4yBqw2ReDe3JNVMWUXxmlCQTRTnwO+meL/D4N2m5Ys4T3g9cUlWsneQPHEQ==; AWSALBCORS=ZbklkJFuch+wycjcXTKO9BCwzmoLZ9JbRSqg0M5wC+tgWTnEOAEMCRliCpPTbSGDYMoQx3/1Qzjpnr/phs/ZKSmI31KDz0uPAsvLpUqU9Zs0cyP5Yh7euA19wiRhUT20YWM4yBqw2ReDe3JNVMWUXxmlCQTRTnwO+meL/D4N2m5Ys4T3g9cUlWsneQPHEQ==; _we_a_ssid=aaaR9Idsjad9T7_-9IBiy; _gid=GA1.2.735761338.1658374750; WebKlipperAuth=jz7SgX3zBNIMPRMGg5ni; _we_us=1658399711602; __adroll_fpc=98d019a6a7383b98d97c93bac311483a-1658399802896; __ar_v4=2II4J53FLRDUBGIZDUKWME%3A20220720%3A2%7C3GK5HOPAS5HOHC3TUOQ4X3%3A20220720%3A2%7CPOFEMBENINHV3FI44SIJLG%3A20220720%3A2; _clck=6qc1e8|1|f3c|0; _clsk=1x5o9dz|1658399803906|1|1|d.clarity.ms/collect; _uetsid=acc0897008a611edabba99d25eca0ad4; _uetvid=acc0773008a611eda9d601390f5ab28e; _gat_UA-28285682-1=1; drift_campaign_refresh=fa0834fd-34c3-445d-a141-91db4634cbfa" -H "Upgrade-Insecure-Requests: 1" -H "Sec-Fetch-Dest: document" -H "Sec-Fetch-Mode: navigate" -H "Sec-Fetch-Site: same-origin" -H "Sec-Fetch-User: ?1" -H "TE: trailers" -d "url=&source=&authParams=&OWASP_CSRFTOKEN=UHOV-7ELJ-Z7IY-5K80-RZ1G-YAHL-AUTB-4FQC&un=pritesh.pednekar%2B6%40webengage.com&active_region=us&we_region=us"

Thanks will try this.Cannot see the option that you mentioned. May have to update chrome but I can see a copy as cURL in both firefox and chrome.
FYI I’m trying to


copy as cURL. Find SS below

Hmmm, interesting.

Maybe try the link above.

Paste on the left and change the option on the right to curl/bash… see if it gives you a different output. (Also I copied the curl conversion I did of your request above, try that too).

(I don’t know much about curl, this is just what works for me).