In b4j I read the content of the request, using
I want to do the same with the httpServer in b4a, but can't seem to find how to read the servlet's inputStream. I know I can use the post method, still, it would be nice to do the same, for compatibility reasons. Is it something simple?
B4X:
myContent=ReadObject(req.InputStream)
B4X:
Public Sub ReadObject (In As InputStream) As Object
Dim out As OutputStream
out.InitializeToBytesArray(0)
File.Copy2(In, out)
Dim raf2 As RandomAccessFile
raf2.Initialize3(out.ToBytesArray, False)
Dim res As Object = raf2.ReadObject(0)
raf2.Close
Return res
End Sub