From d40ff7098b3dd13b5ea846b86b9e8461ac1875b1 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 16 Sep 2016 17:21:00 -0700 Subject: [PATCH] Clean up api-ref examples If we're going to talk about replacing an object, we should use the same object name as the previous example. Including a non-zero content-length on PUT but not providing a body will timeout. Not including the '-' in '-H' will make curl complain: Rebuilt URL to: H/ * Could not resolve host: H * Closing connection 1 201 Created responses have content-length of zero, not 116. Change-Id: Ifd878559ee4036e4893221c7968f53021f38e236 --- api-ref/source/storage-object-services.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api-ref/source/storage-object-services.inc b/api-ref/source/storage-object-services.inc index 5db102016f..1434842f02 100644 --- a/api-ref/source/storage-object-services.inc +++ b/api-ref/source/storage-object-services.inc @@ -178,7 +178,7 @@ Example requests and responses: :: - curl -i $publicURL/janeausten/helloworld.txt -X PUT -H "Content-Length: 1" -H "Content-Type: text/html; charset=UTF-8" -H "X-Auth-Token: $token" + curl -i $publicURL/janeausten/helloworld.txt -X PUT -d "Hello" -H "Content-Type: text/html; charset=UTF-8" -H "X-Auth-Token: $token" @@ -187,8 +187,8 @@ Example requests and responses: HTTP/1.1 201 Created Last-Modified: Fri, 17 Jan 2014 17:28:35 GMT - Content-Length: 116 - Etag: d41d8cd98f00b204e9800998ecf8427e + Content-Length: 0 + Etag: 8b1a9953c4611296a827abf8c47804d7 Content-Type: text/html; charset=UTF-8 X-Trans-Id: tx4d5e4f06d357462bb732f-0052d96843 Date: Fri, 17 Jan 2014 17:28:35 GMT @@ -198,7 +198,7 @@ Example requests and responses: :: - curl -i $publicURL/janeausten/helloworld -X PUT -H "Content-Length: 0" -H "X-Auth-Token: $token" + curl -i $publicURL/janeausten/helloworld.txt -X PUT -d "Hola" -H "X-Auth-Token: $token" @@ -207,8 +207,8 @@ Example requests and responses: HTTP/1.1 201 Created Last-Modified: Fri, 17 Jan 2014 17:28:35 GMT - Content-Length: 116 - Etag: d41d8cd98f00b204e9800998ecf8427e + Content-Length: 0 + Etag: f688ae26e9cfa3ba6235477831d5122e Content-Type: text/html; charset=UTF-8 X-Trans-Id: tx4d5e4f06d357462bb732f-0052d96843 Date: Fri, 17 Jan 2014 17:28:35 GMT @@ -674,7 +674,7 @@ Example requests and responses: :: - curl -i $publicURL/marktwain/goodbye -X POST -H "X-Auth-Token: $token" H "X-Object-Meta-Book: GoodbyeOldFriend" + curl -i $publicURL/marktwain/goodbye -X POST -H "X-Auth-Token: $token" -H "X-Object-Meta-Book: GoodbyeOldFriend"