mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-18 01:05:54 +01:00
a876c3aff4
added relative tests updated wincellarclientRESTAdapter sample with Asynch function
31 lines
694 B
ObjectPascal
31 lines
694 B
ObjectPascal
unit RESTServicesU;
|
|
|
|
interface
|
|
|
|
uses
|
|
Generics.Collections, WinesBO, MVCFramework.RESTAdapter, MVCFramework,
|
|
ObjectsMappers;
|
|
|
|
type
|
|
|
|
IWineResource = interface(IInvokable)
|
|
['{068C51B2-F413-48ED-97CE-463234DB3E41}']
|
|
|
|
[RESTResource(HttpGet, '/wines')]
|
|
[MapperListOf(TWine)]
|
|
[Mapping(TWines)]
|
|
procedure GetWineList(AAsynchReq: IAsynchRequest);
|
|
|
|
[RESTResource(httpPOST, '/wines')]
|
|
procedure SaveWine([Body] AWine: TWine; AAsynchReq: IAsynchRequest);
|
|
|
|
[RESTResource(httpPUT, '/wines/{id}')]
|
|
procedure UpdateWineById([Param('id')] AID: integer; [Body] AWine: TWine;
|
|
AAsynchReq: IAsynchRequest);
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
end.
|