You are not logged in.
Pages: 1
Hi,
I came across mORMot quite recently and I was pretty excited.
I am interested in implementing a server to host our REST API for our Delphi Clients and Third Party Web Sites (Ajax)
I will use the interface-based approach.
I managed to create a Server but I'm having a hard time with
1. Authentication
- It would be great to have OAuth2, I read that its underway, do we have an idea if someone implemented it yet ?
2. Routing
- I can't see how to implement the following URIs into methods (interface-based)
GET residents/123 (Displays Resident 123)
PUT residents/456 (Creates Resident 456)
I saw the following thread but it is still not clear
- A long shot: I would also like to have versions, hence having 3 different versions of get_residents and that beeing defined in the headers when requested?
3. Raising Standard errors
- When a GET/Residents/123 is not found then return the standard 404
I am a traditional RAD Developer and find hard to understand the Documentation but with a little push I will come around
I believe you are doing an excellent work and am very sorry for taking your precious time.
Thanks in advance
Offline
1. We did not have any recent update about OAuth2 support...
Any help is welcome!
2. Routing is defined by the class used for it.
You have TSQLRestRoutingREST and TSQLRestRoutingJSON_RPC schemes...
See http://synopse.info/files/html/Synopse% … #TITLE_388
If you want to have such low-level routing, you would rather need to use method-based services: one method named "resident" would be enough - also note that our ORM is able to do such kind of routing directly - e.g. if you define a TSQLResidents = class(TSQLRecord) class, the routing you are expecting will be done for you.
But if you want tuned routine, including input headers (which is not a RESTful practice, BTW), you would need method-based services.
3. See point 2.
Thanks for your interest!
Offline
Pages: 1