A dumb question, I know. But I don't normally do web programming and have been asked to send some JSON data and receive some in return.
I googled and it is clear how to encode and decode the JSON data, but I am so new to this that I don't know how to communicate with the given URL and say "here's some data, please send me some back".
Can anyone point me at a simple working code example? For instance, just to pass user_name and password as JSON and to receive some reply ... I think I should be using TIdHTTP
, but am not sure how to use it with JSON. I have one GET and one POST interface.
+1 to @DavidHeffernan but I don't understand who to pass the packed JSON data with my request or to retrieve it from the response. En/de-code is fine, but adding it as parameters has me bogged down.
I really would appreciate a (link to a) small, but complete working example.
Btw, I only have XE2 starter edition, so I don't have datasnap.