Course
ai-dev-tools-zoomcamp
Question
Why does curl -i http://localhost:8000/api/orders/standard-1002 prompt me to supply a Uri instead of making the request?
Answer
In Windows PowerShell 5.1, curl is an alias for PowerShell’s Invoke-WebRequest, not the real curl program. Therefore its flags, including -i, do not work like they do on Linux or macOS.
Call the curl executable explicitly:
curl.exe -i http://localhost:8000/api/orders/standard-1002
-i tells curl to include the HTTP response headers in the output.
Alternatively, use PowerShell’s own command explicitly:
Invoke-WebRequest -Uri http://localhost:8000/api/orders/standard-1002
On PowerShell 7 and later, curl is no longer this alias. Microsoft’s Windows curl documentation
Checklist
Course
ai-dev-tools-zoomcamp
Question
Why does curl -i http://localhost:8000/api/orders/standard-1002 prompt me to supply a Uri instead of making the request?
Answer
In Windows PowerShell 5.1,
curlis an alias for PowerShell’sInvoke-WebRequest, not the real curl program. Therefore its flags, including-i, do not work like they do on Linux or macOS.Call the curl executable explicitly:
-itells curl to include the HTTP response headers in the output.Alternatively, use PowerShell’s own command explicitly:
On PowerShell 7 and later,
curlis no longer this alias. Microsoft’s Windows curl documentationChecklist