search cancel

'curl' is not recognized as an internal or external command, operable program or batch file error in 'Execute External Command' step

book

Article ID: 256359

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

When running an 'Execute External Command' step configured with the curl command, the following error comes up: 
'curl' is not recognized as an internal or external command, operable program or batch file

Environment

Release : all releases

Cause

If there is no curl.exe in the OS environment variable path, then this error comes up.

Resolution

Windows 10/11 has a bundled version of curl.
See: https://curl.se/windows/microsoft.html
The curl.exe program can be found in C:/Windows/system32
So instead of just using curl, use the full path: 
"C:/Windows/system32/curl.exe" -H "Auth...

If there is no curl.exe installed, then download curl from: https://curl.se/windows/
Then add the location of curl to the Envrironment variable path, or use the full path in the command.

Attachments