Trying to pass a roarray to my server thru the url. I can do string with no problem but getting a type mismatch when setting the url. Looks something like
serverurl="http://myserver/myserversecript.php?filename="+myfile+"&myarray="+myarray
I can use the same code and include and send one element of the array as a string and works fine
serverurl="http://myserver/myserversecript.php?filename="+myfile+"&myarray="+myarray[0].title
Can the entire array be sent at one time. Thought about looping thru myarray but thought there had to be another way to avoid making so many calls.
I would do something like this:
ut = CreateObject("roUrlTransfer")
myfileEscaped = ut.Escape(myfile)
myarrayJson = FormatJson(myarray)
myarrayJsonEscaped = ut.Escape(myarrayJson)
serverurl="http://myserver/myserversecript.php?filename="+myfileEscaped+"&myarray="+myarrayJsonEscaped
“belltown” wrote:
I would do something like this:
ut = CreateObject("roUrlTransfer")
myfileEscaped = ut.Escape(myfile)
myarrayJson = FormatJson(myarray)
myarrayJsonEscaped = ut.Escape(myarrayJson)
serverurl="http://myserver/myserversecript.php?filename="+myfileEscaped+"&myarray="+myarrayJsonEscaped
Thanks belltown, this worked.