Android Question post metod & SSL security

SMOOTSARA

Active Member
Licensed User
Longtime User
Hey guys
I must send a Jason data to the host
But the site supports SSL security
I should use the POST method. (this line ==> req.InitializePost(url,?????,?????) )
May I give you guidance on sending this data

B4X:
Dim    url        As String    =    "https://www.xxxxxxx.com/set.php"
    
    ''''json is ==>    {"ip_status":"success","device_charging":true,"user_display_name":"xxx","user_last_name":"yyy"}
    Dim    json    As String    =    prj2.toString.ToLowerCase

    HC1.InitializeAcceptAll("HC1")   'This is needed (not HC1.Initialize("HC1"))
    Dim req As OkHttpRequest           'This should become OkHttpRequest
    req.InitializePost(url,?????,?????)
    HC1.Execute(req, 1)
 

DonManfred

Expert
Licensed User
Longtime User
You should use okHttputils2 instead of using the httpclient directly.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
Last edited:
Upvote 0

SMOOTSARA

Active Member
Licensed User
Longtime User
Upvote 0
Top