From c2624840e7f1a81d22043686379de4cba27452ba Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Mon, 25 Aug 2008 15:38:50 +0200 Subject: [PATCH] update Tracks RESTapi documentation page when using xml as content type, you should send xml --- app/views/integrations/rest_api.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/integrations/rest_api.html.erb b/app/views/integrations/rest_api.html.erb index f401328f..4ab9a2b7 100644 --- a/app/views/integrations/rest_api.html.erb +++ b/app/views/integrations/rest_api.html.erb @@ -73,7 +73,7 @@
 
 $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
-    -d "project[name]=Build a treehouse for the kids" \
+    -d "<project><name>Build a treehouse for the kids</name></project>" \
     <%= home_url %>projects.xml -i
 >> HTTP/1.1 201 Created
 Location: <%= home_url %>projects/65.xml
@@ -86,7 +86,7 @@ Location: <%= home_url %>projects/65.xml
 
 
 $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
-    -d "todo[description]=Model treehouse in SketchUp&todo[context_id]=2&todo[project_id]=65" \
+    -d "<todo><description>Model treehouse in SketchUp</description><context_id>2</context_id><project_id>65<project_id>" \
     <%= home_url %>todos.xml -i
 >> HTTP/1.1 201 Created
 Location: <%= home_url %>todos/452.xml
@@ -99,7 +99,7 @@ Location: <%= home_url %>todos/452.xml
 
 
   $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
-      -d "todo[notes]=use maple texture" \
+      -d "<todo><notes>use maple texture</notes></todos>" \
       <%= home_url %>todos/452.xml -i
   >> HTTP/1.1 200 OK
   ...