title: Using REST request in Delphi
body: <p>I need to write a simple REST-server in Delphi and a client in Ruby on Rails. I've watched all of the videos by Marco Cantu about REST in Delphi and I've got a question:</p>
  
  <p>How can Delphi process requests like <code>"/users/1"</code> where <code>1</code> is the ID of a user?</p>
  
  <p>All of the examples I've seen use simple functions (like <code>EchoString(value)</code> or <code>ReverseString(Value)</code>) and the request is <code>"Datasnap/rest/ClassName/EchoString/Value"</code>, but I need a request like <code>"Datasnap/rest/classname/123"</code>.</p>
  
  <p>For example: <code>TContractsCollection</code> is a collection of contracts and I want to view the contract with <code>ID=324556</code>. So in a browser (and in the RoR client) it will be (for example):</p>
  
  <pre><code>"http://localhost:3000/DataSnap/rest/TContractsCollection/324556"
  </code></pre>
  
  <p>But Delphi writes: </p>
  
  <p><code>"TContractsCollection method not found in the server method list"</code> </p>
  
  <p>Any ideas?</p>