Rewrite the following CURL command as a Powershell script RRS feed

  • Question

  • How would I rewrite the following curl command as a Powershell script?

    I'm restricted to using Powershell v2, and can't access the Invoke-RestMethod cmdlet:

    curl -s -X POST \
                -H "Content-Type: application/json" \
                -d '{"auth": {"tenantName": "'"$OS_TENANT_NAME"'", "passwordCredentials":
                {"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}' \
                | python -m json.tool

    I am trying to send JSON data to the Openstack API (

    Wednesday, July 8, 2015 5:12 PM

All replies