Java Utililty Methods HTTP Post

List of utility methods to do HTTP Post

Description

The list of methods to do HTTP Post are organized into topic(s).

Method

voidwriteFileFromUrl(URL sourceUrl, File targetFile)
write File From Url
HttpURLConnection connection = (HttpURLConnection) sourceUrl.openConnection();
connection.setRequestMethod("GET");
InputStream in = connection.getInputStream();
FileOutputStream out = new FileOutputStream(targetFile);
FileCopy(in, out, 1024);
out.close();
voidwriteString(HttpURLConnection conn, String content, String charsetName)
write String
writeString(conn.getOutputStream(), content, charsetName);
voidwriteToConnection(final HttpURLConnection couchdbConnection, final String content)
write To Connection
try {
    couchdbConnection.setDoOutput(true);
    final DataOutputStream dataOutputStream = new DataOutputStream(couchdbConnection.getOutputStream());
    dataOutputStream.writeBytes(content);
    dataOutputStream.flush();
    dataOutputStream.close();
} catch (IOException ioe) {
    throw new RuntimeException(ioe);
...