/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String type
= "application/x-www-form-urlencoded"; URL u
= new URL("https://w...content-available-to-author-only...m.com/"); conn.setDoOutput(true);
conn.setRequestMethod("POST");
conn.setRequestProperty( "Content-Type", type );
conn.
setRequestProperty( "Content-Length",
String.
valueOf(encodedData.
length()));os.write(encodedData.getBytes());
do {
line = buff.readLine();
System.
out.
println(line
+ "\n"); } while (line != null);
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN0cmluZyByYXdEYXRhID0gIiI7ClN0cmluZyB0eXBlID0gImFwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCI7ClN0cmluZyBlbmNvZGVkRGF0YSA9IFVSTEVuY29kZXIuZW5jb2RlKCByYXdEYXRhLCAiVVRGLTgiICk7IApVUkwgdSA9IG5ldyBVUkwoImh0dHBzOi8vdy4uLmNvbnRlbnQtYXZhaWxhYmxlLXRvLWF1dGhvci1vbmx5Li4ubS5jb20vIik7Ckh0dHBVUkxDb25uZWN0aW9uIGNvbm4gPSAoSHR0cFVSTENvbm5lY3Rpb24pIHUub3BlbkNvbm5lY3Rpb24oKTsKY29ubi5zZXREb091dHB1dCh0cnVlKTsKY29ubi5zZXRSZXF1ZXN0TWV0aG9kKCJQT1NU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