You can send LiveCode arrays to revIgniter using POST. For this to work the following headers must be sent along with the POST data: revigniter.com ![]()
Content-Type: application/lc.array
or
Content-Type: application/lc.array.compressed
respectively in case you like to send your array in compressed form
# Use
base64Encode(arrayEncode(myArray))
or
base64Encode(compress(arrayEncode(myArray)))
to prepare LiveCode arrays on the client side. Then format your data using LiveCode's libURLFormData() function like:
put libURLFormData("arrayName", tMyPreparedArray, "anotherArrayName", tMyOtherPreparedArray, "keyForSomeString", "myString") into tDataToSend
Set the correct header and send the data to revIgniter:
set the httpHeaders to "Content-Type: application/lc.array.compressed" post tDataToSend to URL "http://mysite.com/mycontroller/"
On the server side you can retrieve your data like:
put rigVarPost("arrayName") into tMyArray