Send command with cURL

Hello !

i’m getting crazy trying to send this command with cURL…

curl -s -X POST https://identity.api.rackspacecloud.com/v2.0/tokens \
-H “Content-Type: application/json” \
-d ‘{
“auth”: {
“RAX-KSKEY:apiKeyCredentials”: {
“username”: “{username}”,
“apiKey”: “{apiKey}”
}
}
}’ | python -m json.tool

From the resulting json, i should set this three variables: TOKEN, ENDPOINT, and CDN_ENDPOINT.

export TOKEN="{tokenId}"
export ENDPOINT="{publicUrl}" # For the Cloud Files service
export CDN_ENDPOINT="{cdnEndpoint}" # Also from the cloud files service

Can someone please drop me a hint on this ?

You’re trying to reproduce this in Xojo, you want to send this through a Shell in Xojo, or you want to do this entirely on the command line outside of Xojo?

you could use CURLSMBS class to do this.
see
http://www.mbsplugins.de/archive/2013-09-26/CURL_from_command_line_to_Plug/monkeybreadsoftware_blog_archive

Thanks a lot guys for your help !

My starting point is this.

@Kem Tekinay, i would like to send this through Xojo and be able to upload images to the cloud files container

@Christian Schmitz, thanks a lot for the link !

In this case not possible for you to use HTTPSecureSocket ? ( http://documentation.xojo.com/index.php/HTTPSecureSocket)

HTTPSecureSocket is not secure.

Don’t know, right now i’m using CURLSMBS and work great so i’ll stick with that, still i have problems with the PUT command but hope to solve it quickly :slight_smile:

Thanks for your suggestion John.