Android Question Servlet Response Always Return Empty Result

Ganiadi

Active Member
Licensed User
Longtime User
Hi, Please Help
I've been trying to solve below case but still have no solution
I write a B4A Http server to handle simple WEB Request, but it return nothing, while in the log its shows value

CODE:
Sub GetDeviceHandle(Request As ServletRequest, Response As ServletResponse)
Dim job2 As HttpJob
Dim cResult As String
   
   
    Try
        job2.Initialize("Job2", Me)
        job2.PostString("http://192.168.1.177/getparameter?address=206","")
        job2.GetRequest.SetContentType("text/plain")
       
        wait for (job2) JobDone(job2 As HttpJob)
        If job2.Success Then
            cResult = job2.GetString                      
        End If

    Catch
        Log(LastException)
    End Try

    Log(cResult)
   
    Response.SetContentType("text/html")
    Response.SendString(cResult)
       
End Sub

I Can not get below response in my apps
Response.SendString(cResult)

While actually i got the result in the log


What has been wrong, your help much be appreciated


Tq
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…