Android Question Post array to url

Gijsen

Member
Licensed User
Longtime User
This seems to work, although it looks ugly...

B4X:
httpJob.PostString("http://url?codes=" & listCodes, "")
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is no such thing as posting an array. It is up to you to convert the array to a string (or raw bytes).
For example:
B4X:
Dim sb As StringBuilder
sb.Initialize
If listCodes.Length > 0 Then
 For Each code As String In listCodes
  sb.Append(code).Append(",")
 Next
 sb.Remove(sb.Length - 1, sb.Length)
End If
httpJob.PostString("http://url, "listCodes=" & sb.ToString)
 
  • Like
Reactions: MTV
Upvote 0
Top