Use Delphi Client API
The generated delphi api dir structure is
uUserItem.pas uUserItemAPI.pas
How to use it:
- Create A Client instance
- Create named request instance
- Set request param values
- call request
- Use the return values
Here is a code snippet:
uses Classes, uUserItem, uUserItemAPI, uHttpApiBase; var req : TUserItemGetAction; client: THttpAPIClientInfo; begin client := THttpAPIClientInfo.Create; client.sServerURI := 'http://127.0.0.1:8001/api/'; req := TUserItemGetAction.Create(client); req.sUserName := 'test'; try if req.execute then begin lblEmail.Text := req.getResult.sEmail; end else begin lblError.Text := req.getErrorMessage; end; finally req.Free; client.Free; end; end;