0
votes

Can anyone give any suggestion why this error is occurring ?

cmd curl command

curl https://xyz.com/Dash.aspx?nl=Gas%20Daily&nl2=Home

Error

nl2 is not recognized as an an internal or external command, operable program or batch file

I have also tried

curl https://xyz.com/Dash.aspx?nl=Gas%20Daily'&'nl2=Home

But still the same error

1
You're encountering some kind of shell escaping issue. Given that curl is multi-platform, please indicate which OS/shell you're actually working with. - Damien_The_Unbeliever
@PaulSweatte I don't think this is a duplicate, as that other question (despite the title) turned out to be a problem with setting the correct request header, not an escaping problem. - Jeen Broekstra

1 Answers

0
votes

As mentioned in the comments, it's an escaping issue. Try enclosing the URL in quotes, like so:

curl 'https://xyz.com/Dash.aspx?nl=Gas%20Daily&nl2=Home'