You are not logged in.
Hi all,
as far as I understand, invoking an interface method from a delphi client translate in a
POST /interface/method
call. Is there a way to force the client to make the same call with different HTTP verbs ?
Offline
As documented, you can also use GET + parameters encoded on the URI.
https://synopse.info/files/html/Synopse … #TITLE_449
RTFM!
If you want something more complex, create your own routing class.
Offline
Hi Ab,
I've re-read TFM
as I remembered it says that: The pure Delphi client implementation will use only POST.
Your first suggestion to use URL encoded params with a GET verb does not meet my needs because does not cover PUT and DELETE verbs.
Just to explain better my question, my problem is NOT about how to encode params, but only about the HTTP verb to use, ie how to make a
DELETE /interface/method or
PUT /interface/method
call from Delphi, with the params in the body as for the 'standard' call that delphi do, a POST
If nothing easy/ready is already implemented, please just only point me in the right direction, any suggestion from the Guru will be welcome! :-)
Thanks for your support!
Offline
Cause I consume some interface based services from an AJAX client, trying to follow a REST approach, so for example I have a service
/customers/order
I can call with GET/PUT/POST/DELETE to perform CRUD operations.
I'd like to consume the same methods from a Delphi client, w/o changes on server side.
If I am not wrong with method based services this is a no-issue, but I LOVE the design that interface based methods enforces on the server!
Sounds strange to me nobody else has similar needs. Am I missing something ?
Offline
Interface-based services are providing RPC-like services over REST, not true REST services.
So changing the verb don't make much sense, since on the server side, there is no way of using it.
If you expect something diverse than the default routing scheme, you will have to define your own routing class.
But it will be a lot of work for IMHO no advantage, since it will be hidden behind the hood.
Offline