how to MultipartPost.CreatePostRequest

GeordieJenner

Member
Licensed User
Longtime User
i am trying to take the data from the screen (10 or so fields), Map them and post them to MSSQL. with that, return Map'ed data. i have searched Http+Post and are not finding good examples. the link below has an interesting story, but i cannot find any documentation on it. i have no great need to do the below link, but just to accomplish the above task

http://www.b4x.com/forum/basic4andr...ndroid-http-multipart-requests.html#post47094
 

GeordieJenner

Member
Licensed User
Longtime User
i am using JSON
Also, i looked through the tutorial, and it appeared to be using sql strings, like TSql to the local machine. not secure enough for me.
 
Last edited:
Upvote 0

GeordieJenner

Member
Licensed User
Longtime User
i must not be asking the question correctly. i have a wcf service, i have https. i have a HttpRequest working with a req.InitializeGet. i retrieve data, working perfect. but this is too simple.

i am trying to take the data from the screen (10 or so fields), Map them and post them to MSSQL. with that, return Map'ed data. i have searched Http+Post and are not finding good examples. POST with parameters seems to be more powerful for sending data to the server.
 
Upvote 0

GeordieJenner

Member
Licensed User
Longtime User
humm, not seeing it
here is your sub
Sub PostString(JobName As String, URL As String, Text As String)
PostBytes(JobName, URL, Text.GetBytes("UTF8"))
End Sub
the parameters do not match up
i am currently using HttpClient
hc.Initialize("hc_abcd")
Dim req As HttpRequest
req.InitializeGet(strURL & "/MyServiceUriTemplate")
hc.Execute(req,1)
this works well, except for parameters
 
Upvote 0

GeordieJenner

Member
Licensed User
Longtime User
would really like to do something like this
Dim maps As List
maps.Initialize
For i = 0 To Table.Size - 1
Dim mapRow As Map
Dim row() As String
row = Table.Get(i)
mapRow.Initialize
mapRow.Put("Name", row(0))
mapRow.Put("Id", row(1))
mapRow.Put("Population", row(2))
maps.Add(mapRow)
Next
hc.Initialize("hc_abcd")
Dim req As HttpRequest
req.InitializeGet(strURL & "/MyServiceUriTemplate/" & maps)
hc.Execute(req,1)
 
Upvote 0
Top