cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: Using Curl with rackspacecloud.com

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 13 Apr 2010 14:03:31 +0200 (CEST)

On Mon, 12 Apr 2010, Stuart Halliday wrote:

> C:\curl -X POST -H "X-Auth-Token: xxxxxxxx-XXXXX--xxxxxxxxx" \
> https://servers.api.rackspacecloud.com/v1.0/12345/servers/444/action
>
> I understand it is a POST operation.

Yes, but just barely so....

> But the document 'cloud servers developer guide' page 34 doesn't explain
> well what to put into the POST data in order to do a soft or hard reboot.
>
> It says :
>
> Sample XML Request
> <reboot xmlns="http://docs.rackspacecloud.com/servers/api/v1.0"
> type="HARD"/>
>
> Which I assume is the data I've to send in POST format.
>
> But how do I POST this?

Remove the "-X POST" from your command line and replace it with this:

  -d '<reboot xmlns="http://docs.rackspacecloudcom/servers/api/v1.0" \
      type="HARD"/>' (probably in one line)

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET