N nico78 Active Member Licensed User Longtime User Jul 11, 2012 #1 Problem with Byte (Resolved) Hello, I have a problem with this code: Code: Copy Sub Service_Start (StartingIntent As Intent) Dim Postdata() As Byte If hcInit = False Then hc.Initialize("hc") Dim req As HttpRequest Postdata=Main.numero.GetBytes("UTF8") req.InitializePost2( Main.Url,Postdata) hc.Execute(req, Send) End Sub The first time when Main.numero = "0123456789", Postdata = "0123456789", it's ok but the second time when Main.numero = "new", Postdata = "new3456789" ? Where is the error? Last edited: Jul 13, 2012
Problem with Byte (Resolved) Hello, I have a problem with this code: Code: Copy Sub Service_Start (StartingIntent As Intent) Dim Postdata() As Byte If hcInit = False Then hc.Initialize("hc") Dim req As HttpRequest Postdata=Main.numero.GetBytes("UTF8") req.InitializePost2( Main.Url,Postdata) hc.Execute(req, Send) End Sub The first time when Main.numero = "0123456789", Postdata = "0123456789", it's ok but the second time when Main.numero = "new", Postdata = "new3456789" ? Where is the error?
Erel B4X founder Staff member Licensed User Longtime User Jul 11, 2012 #2 This code looks correct. The problem is somewhere else. I recommend you to use HttpUtils2. It will make it simpler. Upvote 0
This code looks correct. The problem is somewhere else. I recommend you to use HttpUtils2. It will make it simpler.
N nico78 Active Member Licensed User Longtime User Jul 11, 2012 #3 yes but I would like to understand what's wrong, I do not see why it works with httputils2, someone has a simple code that works? Upvote 0
yes but I would like to understand what's wrong, I do not see why it works with httputils2, someone has a simple code that works?
N nico78 Active Member Licensed User Longtime User Jul 13, 2012 #4 There was no problem, i had a problem on the server! Thank you for your help. Upvote 0