0

I'm working on a project using creating a game server, the game uses HTTP to communicate back and forth so I require to be able to send binary data as a HTTP response.

Preferably I'd like access to a DataOutputStream object to write to however I haven't found anything that would help without making the application more complicated than my hand rolled basic HTTP server

The game is made by some other company I have nothing to do with so I have to live with the HTTP implementation.

Reddy360
  • 11
  • 1
  • `public static Response newFixedLengthResponse(IStatus status, String mimeType, byte[] data) {` should do the job for you. See https://github.com/NanoHttpd/nanohttpd/blob/master/core/src/main/java/org/nanohttpd/protocols/http/response/Response.java – Fildor Jan 19 '17 at 15:35
  • Looks like just what I want, I'll give it a go when I head home. – Reddy360 Jan 19 '17 at 15:50

0 Answers0