Please help how to call flowgear workflow using JAVA POST API. My flowgear end point is 6.somesubdomain.mydomain(This end point is valid?).I used this code to call flowgear workflow but it is not work my end point is not call(please check my end point is valid).
URL myURL = new URL("https://6.somesubdomain.mydomain.flowgear.io/test/");
HttpURLConnection con = (HttpURLConnection)myURL.openConnection();
String userCredentials = "email:password";
String basicAuth = "Basic " + new String(new Base64().encode(userCredentials.getBytes()));
con.setRequestProperty ("Authorization", basicAuth);
con.setDoOutput(true);
con.setDoInput(true);
con.setUseCaches(false);
con.setRequestProperty("Content-Type", "application/json");
con.setRequestProperty("Accept", "application/json");
con.setRequestMethod("POST");
con.connect();
OutputStream os = httpCon.getOutputStream();
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
osw.write(somejsondata.toString());
osw.flush();
osw.close();
Please give me response. Thanks.