hgoebl / DavidWebb

Lightweight Java HTTP-Client for calling JSON REST-Services (especially for Android)
https://hgoebl.github.io/DavidWebb/
MIT License
127 stars 41 forks source link

Stream support #35

Open Hugolarson opened 11 months ago

Hugolarson commented 11 months ago

Hi,

Thank you for this library. Have a question how to accomplish this with it.

I dont want to write to ByteArrayOutputStream and then send it.

URL url = new URL(urlStr); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();

ObjectOutputStream objOut = new ObjectOutputStream(new BufferedOutputStream(urlConnection.getOutputStream())); objOut.writeObject("Hello");

objOut.flush(); objOut.close();