Skip to content

Instantly share code, notes, and snippets.

@philwo
Created February 3, 2019 14:36
Show Gist options
  • Save philwo/60211bf88bd3d2c0b9939433db1e886d to your computer and use it in GitHub Desktop.
Save philwo/60211bf88bd3d2c0b9939433db1e886d to your computer and use it in GitHub Desktop.
java_binary(
name = "repro",
main_class = "Repro",
srcs = ["Repro.java"],
)
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
public class Repro {
public static void main(String[] args) throws Exception {
URL url = new URL("https://github.com");
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
System.out.println(con.getContent());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment