PowerShell commands; copy one block at a time. Set the curl.exe path first.

$curlPath = 'C:\Tools\curl\bin\curl.exe'
& $curlPath --version

python mock_http_server.py

& $curlPath --silent --show-error --fail-with-body --connect-timeout 3 --max-time 10 --output status.json http://127.0.0.1:8765/status
Get-Content -LiteralPath status.json

& $curlPath --silent --show-error --fail-with-body --max-time 10 --header 'Content-Type: application/json' --data-binary '@payload.json' http://127.0.0.1:8765/echo

& $curlPath --silent --show-error --max-time 10 --dump-header headers.txt --output NUL http://127.0.0.1:8765/status
Get-Content -LiteralPath headers.txt

& $curlPath --silent --show-error --fail-with-body --max-time 10 http://127.0.0.1:8765/unavailable
$LASTEXITCODE
