http - sending binary data via POST on android -


Supports a limited edition of Android apache's http client (v4) Generally if I type content type = application / I want to send binary data through POST using octet-stream, so I do the following:

 HTTP Client Client = getHttpClient (); HttpPost method = new HTTP post ("http://192.168.0.1:8080/xxx"); System.err.println ("Send to server" + s); If (compression) {byte [Compressed = compressed (s); RequestEntity unit = new bytererentity (compressed); Method.setEntity (unit); } HttpResponse resp = client.execute (method); 

However ByteArrayRequestEntity is not supported on Android. What can i do

I think you want 3.x to

< / Html>

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -