diff --git a/app/views/integrations/rest_api.html.erb b/app/views/integrations/rest_api.html.erb index 0012d7e6..f401328f 100644 --- a/app/views/integrations/rest_api.html.erb +++ b/app/views/integrations/rest_api.html.erb @@ -20,7 +20,7 @@
 
-  $ curl -u username:p4ssw0rd \
+  $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
       <%= home_url %>contexts.xml
   >> <?xml version="1.0" encoding="UTF-8"?>
   <contexts>...</contexts>
@@ -31,7 +31,7 @@
 
 
 
-  $ curl -u username:p4ssw0rd \
+  $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
       <%= home_url %>contexts/51.xml
   >> <?xml version="1.0" encoding="UTF-8"?>
   <context>...</context>
@@ -42,7 +42,7 @@
 
 
 
-  $ curl -u username:p4ssw0rd \
+  $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
   <%= home_url %>contexts/51/todos.xml
   >> <?xml version="1.0" encoding="UTF-8"?>
   <todos type="array">...</todos>
@@ -72,7 +72,7 @@
 
 
 
-$ curl -u username:p4ssw0rd \
+$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
     -d "project[name]=Build a treehouse for the kids" \
     <%= home_url %>projects.xml -i
 >> HTTP/1.1 201 Created
@@ -85,7 +85,7 @@ Location: <%= home_url %>projects/65.xml
 
 
 
-$ curl -u username:p4ssw0rd \
+$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
     -d "todo[description]=Model treehouse in SketchUp&todo[context_id]=2&todo[project_id]=65" \
     <%= home_url %>todos.xml -i
 >> HTTP/1.1 201 Created
@@ -98,7 +98,7 @@ Location: <%= home_url %>todos/452.xml
 
 
 
-  $ curl -u username:p4ssw0rd -X PUT \
+  $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
       -d "todo[notes]=use maple texture" \
       <%= home_url %>todos/452.xml -i
   >> HTTP/1.1 200 OK
@@ -119,7 +119,7 @@ Location: <%= home_url %>todos/452.xml
 
 
 
-  $ curl -u username:p4ssw0rd -X PUT \
+  $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
       <%= home_url %>todos/452/toggle_check.xml -i
   >> HTTP/1.1 200 OK
   ...
@@ -140,7 +140,7 @@ Location: <%= home_url %>todos/452.xml
 
 
 
-  $ curl -u username:p4ssw0rd -X DELETE \
+  $ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X DELETE \
       <%= home_url %>todos/452.xml -i
   >> HTTP/1.1 200 OK
   ...
@@ -159,7 +159,7 @@ Location: <%= home_url %>todos/452.xml
 
 
 
-$ curl -u username:p4ssw0rd \
+$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
     <%= home_url %>contexts/2/todos.xml
 >> <?xml version="1.0" encoding="UTF-8"?>
 <nil-classes type="array"/>
@@ -215,4 +215,4 @@ irb(main):003:0>
   
  • ... indicates that unimportant bits of response data have been removed to eliminate noise from the documentation
  • -

    All examples make use of cURL .

    \ No newline at end of file +

    All examples make use of cURL .