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:
How can Delphi process requests like "/users/1" where 1 is the ID of a user?
All of the examples I've seen use simple functions (like EchoString(value) or ReverseString(Value)) and the request is "Datasnap/rest/ClassName/EchoString/Value", but I need a request like "Datasnap/rest/classname/123".
For example: TContractsCollection is a collection of contracts and I want to view the contract with ID=324556. So in a browser (and in the RoR client) it will be (for example):
"http://localhost:3000/DataSnap/rest/TContractsCollection/324556"
But Delphi writes:
"TContractsCollection method not found in the server method list"
Any ideas?