You are not logged in.
Pages: 1
I need to access a third-part Rest server (that I have no control) - it will return JSON data.
Is it possible to use mORMot as a Rest Client Library? For example, I'd like to use mORMot to access the JSON data, transform it to Delphi Object, then persist the data to another RDBMS.
Is mORMot a good candidate to accomplish this? Is there any document or sample that I can follow?
Thank you
Last edited by xiwuping (2020-12-31 17:14:18)
Offline
I would recommend taking a look at SynCrtSock unit, there are several client classes. I'm using mostly TWinHTTP-based classes for many third-party REST services with different rather complex schemas. But probably the fastest and easiest way might be TSimpleHttpClient.
JSON parsing to object: https://synopse.info/files/html/api-1.1 … ONTOOBJECT
Offline
I would recommend taking a look at SynCrtSock unit, there are several client classes. I'm using mostly TWinHTTP-based classes for many third-party REST services with different rather complex schemas. But probably the fastest and easiest way might be TSimpleHttpClient.
JSON parsing to object: https://synopse.info/files/html/api-1.1 … ONTOOBJECT
Thank you @Vitaly. Appreciate your suggestion. Following your suggestion, I looked into SynCrtSock.pas, and end up using HttpGet directly, and _JsonFast.
Last edited by xiwuping (2021-01-01 16:29:00)
Offline
Pages: 1