Skip to content

Instantly share code, notes, and snippets.

@DV8FromTheWorld
Created June 26, 2014 22:56
Show Gist options
  • Save DV8FromTheWorld/e745399b91380aad9b02 to your computer and use it in GitHub Desktop.
Save DV8FromTheWorld/e745399b91380aad9b02 to your computer and use it in GitHub Desktop.
private static void writeToConnection(HttpURLConnection conn, String message)
{
OutputStreamWriter writer;
try
{
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(message);
writer.flush();
writer.close();
}
catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment