I use a POST method for sending some data to a server and the server replies me back within few seconds. The reply is usually text message "we received your data", however in some cases (depending what I send) it sends back a pictogram - see the attachments. I want to show the pictogram on the screen, then write it with a keyboard into a textbox and send it back again to the server. I suppose I have to read the reply in bytes, not as a text and then decode it to show the pictogram. Can the reading be done with a response object? Is the any example how to read http data in bytes?
If the server replies me with the pictogram I cannot see any received message. The response.ContentLength returns value -1
response.New1
response.Value = request.GetResponse
bin.New1(response.GetStream, True) 'BinaryFile object named bin
bit.New1 'Bitwise object named bit
Dim buffer(512) As byte
count = bin.ReadBytes(buffer(),512)
2) and for the pictogram:
B4X:
bitmap.New2(image1.Width,image1.Height) 'ImageLib object named bitmap
image1.Image = bitmap.Value
drawer.New2(bitmap.Value,B4PObject(5)) 'ImageLib object named drawer
pen1.New1 (cRed) 'ImageLib object named pen1
...
drawer.DrawLine(pen1.Value, (x*8)+n, y, (x*8)+n+1, y)
drawer.Refresh(0, 0, width, height)
Interresting thing is that on a PC the pictogram is shown properly, i.e. red numbers on white background but on the PDA it is red numbers on black background. (L)