Android Question Apply Get Method to Http Interface ?

LaryLee

Member
Licensed User
Longtime User
A company server admin. Greate an Interface of Http let me to use combination to gain the html-format data , such as below :

http://xxx.xxx.xxx/message/mdndown_vb.php?club=9999&mid=0&oid=0&date=20131121

If I use I.E. , just post these strings , and I will get data as :

3,0 F412345799,131121,005900,999,999001,0999999999,1201500,223344,2013-09-12,00:59:01 F450E0F7,131121,054528,999,999001,0978664458,0,0,2013-08-10,10:11:28 F450E0F799,131121,055705,999,999002,0978664458,0,0,2013-08-10,10:11:29

My Basic4Android Codes are following :


Sub Process_Globals
Dim HttpClient1 As HttpClient
Dim ServerUrl As String
ServerUrl = "http://xxx.xxx.xxx/message/mdndown_vb.php"
Dim SendText As String
SendText = "?club=9999&mid=0&oid=0&date=20131121"


End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)

Dim request As HttpRequest
Dim response As HttpResponse
If FirstTime Then

HttpClient1.Initialize("Http")
End If
Msgbox("Start", "")

request.InitializeGet( ServerUrl & SendText )
ProgressDialogShow("start")
If HttpClient1.Execute( request, 1 ) = False Then
Msgbox("Failure", "")
Else
ProgressDialogHide
Msgbox("Success", "")
Http_ResponseSuccess (response , 1 )
End If

End Sub
Sub Activity_Resume

End Sub
Sub Activity_Pause (UserClosed As Boolean)

End Sub
Sub Http_ResponseSuccess (Response As HttpResponse, TaskId As Int )
Dim retStr As String
Msgbox("Here", "")
If TaskId = 1 Then
retStr= Response.GetString("UTF8")
Msgbox ( retStr, "" )
End If
End Sub



--------------------------------------------------------------------------------------------------------------
After process this instruction :
retStr= Response.GetString("UTF8")

I go a Null.exception . There is nothing return.

Please help me to get the data from the "http interface" , thanks!
 

LaryLee

Member
Licensed User
Longtime User
Thanks.
I got several resluts, "500 Internal server error". So, I try to use different ways to find the solution......
 
Upvote 0
Top