First steps with REST and JSON

First steps with REST and JSON
This is my first try to do something with REST and JSON. The server side is provided by the Delphi Dabbler SWAG archive the client is written with Delphi 10.1 Berlin.
http://blog.dummzeuch.de/2016/09/25/first-steps-rest-json/

Comments

  1. You can try json2delphiClass tool to create strongly types classes for the response and load them from json string. The same applies for the request. It's handy :)

    ReplyDelete
  2. could you plz in your blog elaborate on the initialization specifically
    why const
    WM_Init = 4711;
    ?

    ReplyDelete
  3. shlomo abuisak google 4711 echt kölnisch Wasser ;-)
    I use this post message trick to start something after the initialization of a form has finished.

    ReplyDelete
  4. Interesting example to see some of the flexibility that the JSON classes offer. However, TRESTClient wraps the concept that is "REST" really well and you should give it a second try. Especially the TDataset mapping is VERY flexible. I might simply blog an extract from my Pexels component that uses it... might get you started with the components. I haven't looked into asynchronous requests yet, which is also something that the EMBT REST lib offers.

    ReplyDelete
  5. Holger Flick I just could not make sense of the online help of TRESTClient. Maybe I'll get back to it next time I run across a server supporting REST with some content that interests me. Maybe there is another snippets server somewhere?

    ReplyDelete
  6. Thomas Mueller Documentation is pretty slim with regard to those new technologies. If you can wait a couple of days, you will be able to use my blog post. However, it helps to read into the basic concepts of REST first, i.e. such things as the terminology and basic principles it follows. The EMBT components are really perfect in that regard (e.g. how the components are structured, how the properties are named and how flexible the parameters are).

    ReplyDelete

Post a Comment