README.textile in optionsful-0.1.5 vs README.textile in optionsful-0.1.6

- old
+ new

@@ -6,31 +6,52 @@ * Note for the dummies: change host names and paths properly. * Note for the unfaithful: run @rake routes@ to validate the results. h2. "-No! No! No! *-Show me the code!*" +h3. Retrieving an HTTP OPTIONS request via telnet: + <pre> -$ telnet kayaman.baurets.net 3000 -OPTIONS /notes HTTP/1.1 -Host: kayaman.baurets.net +$ telnet localhost 3000 +OPTIONS /posts HTTP/1.1 +Host: http://localhost:3000 HTTP/1.1 204 No Content Allow: GET, POST -Date: Sat, 10 Jul 2010 23:46:00 GMT -Link: <http://baurets.net/api/resources>; type=text/html; rel=help +Connection: close +Date: Thu, 22 Jul 2010 17:20:27 GMT +Link: <http://localhost:3000/opts/posts>; type=text/html; rel=help -OPTIONS /notes/1 HTTP/1.1 -Host: kayaman.baurets.net +OPTIONS /posts/1 HTTP/1.1 +Host: http://localhost:3000 HTTP/1.1 204 No Content Allow: GET, PUT, DELETE -Date: Sat, 10 Jul 2010 23:47:47 GMT -Link: <http://baurets.net/api/resources>; type=text/html; rel=help +Connection: close +Date: Thu, 22 Jul 2010 18:14:24 GMT +Link: <http://localhost:3000/opts/posts/1/>; type=text/html; rel=help -</pre> +OPTIONS /posts/1/comments HTTP/1.1 +Host: http://localhost:3000 +HTTP/1.1 204 No Content +Allow: GET, POST +Connection: close +Date: Thu, 22 Jul 2010 18:12:43 GMT +Link: <http://localhost:3000/opts/posts/1/comments>; type=text/html; rel=help + +</pre> ~Note the empty line which is part of the HTTP protocol.~ + +h3. Retrieving the resource/service documentation right from your browser: + +* Access the given Link header through your preferable browser. Yeah, via an HTTP GET request. +* @http://localhost:3000/opts/posts/1/comments@ for instance. +* Try up adding some RDoc-like comments above your actions definitions on the appropriate controllers. +* Refresh the page and your documentation and have fun! +* There's a lot of helpful things we can do with this extracted 'on-the-fly' information (metadata). + h2. INSTALLATION: # Change directory to your Ruby on Rails web application, # Add gem dependency to @config/environment.rb@: \ No newline at end of file