none
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 http://8.21.28.222:5000/v2.0/tokens \
                -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 (http://docs.openstack.org/api/quick-start/content/).


    Wednesday, July 8, 2015 5:12 PM

All replies