Android Question HttpServer y HttpUtils2

josmaroal

Member
Licensed User
Longtime User
Ingles:
I study the library "HttpServer" v1.00 and its examples, please help with this:
This routine in B4A, receives all data OK, except: request.GetParameter ("message")
español:
Estudio la librería “HttpServer” v1.00 y sus ejemplos, por favor ayuda con esto:
Esta rutina en B4A, recibe bien todos los datos Ok, excepto: request.GetParameter("message")

Sub Server_HandleRequest (req As ServletRequest, res As ServletResponse)
Try
Dim var1 as String
var1 = req.RemoteAddress & "_" & req.RequestURI & "_" & req.GetParameter("message"), true)
If request.Method = "POST" Then
ToastMessageShow("Post:" & var1, true)
Else
ToastMessageShow("No Post:" & var1, true)
End If
Catch
Responde.Status = 500
ToastMessageShow("Error serving request: " & LastException)
End Try

End Sub

Another Android device: (Otro dispositivo Android:)
Sub SendText_Click
Dim link As String = "http://192.168.1.54:48054/"
Dim j As HttpJob ' Librería HttpUtils2 v 2.01
j.Initialize("message", Me)
j.PostString(link & "/?type=text", txtMessage.Text)
End Sub


Gracias por su ayuda.

José Roig
 
Top