Problem with Byte

nico78

Active Member
Licensed User
Longtime User
Problem with Byte (Resolved)

Hello,

I have a problem with this code:
B4X:
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:

nico78

Active Member
Licensed User
Longtime User
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

nico78

Active Member
Licensed User
Longtime User
There was no problem, i had a problem on the server!

Thank you for your help.
 
Upvote 0
Top