This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Nextcloud { | |
static String serverName = "nextcloud.meinserver.de/"; // needs a trailing slash, otherwise, something appends "ocs" to that string | |
static int port = 444; | |
static String userName = "myuser"; | |
static String password = "mypass"; | |
public static void main(String[] args) throws ClientProtocolException, IOException { | |
CloseableHttpClient httpclient = HttpClients.createDefault(); | |
HttpGet httpGet = new HttpGet("https://nextcloud.meinserver.de:444/login"); | |
CloseableHttpResponse response = httpclient.execute(httpGet); |