Ok, so here's what I did.
First of all, I am using HTTPUtils2...it's just not obvious from the subroutine code I posted.
Being new to all this HTTP stuff, it took me quite a while to figure out exactly how to construct my HTTP for the PostString method.
Sub Button1_Click
Dim result, What As String
Dim URL As String
result = Utils.BuildInspPointRecsJSONString(SQLrfid)
URL="http://" & Utils.ListPersistent.Get(Utils.SERVER_IP) & ":" & _
Utils.ListPersistent.Get(Utils.SERVER_PORT) & "/datasnap/rest/TServerMethods1/Storage/Rows"
Log(result)
What = OPDetailsJob.PostString(URL, result)
OPDetailsJob.GetRequest.SetContentType("application/json")
End Sub
For anyone who is trying to do what I am trying to do, the following will be helpful.
The "server" in this case is a Delphi Datasnap REST server.
It handles POSTs according to this link:
DataSnap REST Messaging Protocol - RAD Studio XE3
There they note that the Server method on the Delphi side will convert the JSON to a JSON object of type TJSONValue.
I was confused by the need to supply a key and an ID in the URL, but after looking at this thread
http://www.b4x.com/forum/basic4andr...8-httputils2service-bas-application-json.html
I saw that all I needed to do was to pass in the JSON string as the second parameter of the PostString method. The first parameter of the PostString method was my URL, with the "Key" value appended to the end. In this case, "Rows." That is also the name of the outer JSON object in the JSON string.
Finally, I had to add the line
OPDetailsJob.GetRequest.SetContentType("application/json")
To tell the server that this is JSON data.
Finally it worked.
I guess this is how it goes when you start from ground zero with B4A, HTTP, JSON and Datasnap servers in Delphi.
Oh, and another thing, I guess servers (or browsers?) somehow always prepend the text "Update" to a Post message? So when I specify my server method in the HTTP line, I eliminate the text "Update" at the start of the method name and it somehow magically adds that to the call, arriving at the correct method in the Delphi app. Go figure.
But yes, it works, so thanks Pablo and all.
This B4A is so productive, flexible and easy to use. I really like it.
Mark