Form hi = new Form("Hi World", BoxLayout.y());
Button test = new Button("Test");
hi.add(test);
test.addActionListener(e -> {
try {
URL url = new URL("https://symdesigns.com/php/export.php");
URL.URLConnection link = url.openConnection();
link.setDoOutput(true);
link.setDoInput(true);
OutputStream os = link.getOutputStream();
os.write(("te...@x.com\n").getBytes());
os.write(("f47ba92cf7\n").getBytes());
os.close();
InputStream is = link.getInputStream();
String ans = Util.readToString(is);
Dialog.show("Success", ans, "OK", null);
} catch(Exception err) {
Dialog.show("Error", err.toString(), "OK", null);
Log.p("URL error");
Log.e(err);
}
});
hi.show();
Codename One Simulator: Passed Xcode Simulator (running iPhone 6 - iOS 12.1) : Passed iPhone 5 - iOS 10.3.3 (actual device) : Passed
By "Passed", I mean I get a dialog that says "Success" in the title and "Nok" in the body.
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/392fb9f1-3c1d-448e-ab79-447a9e30cbc4n%40googlegroups.com.
URL url = new URL("https://symdesigns.com/php/export.php");
URL.HttpURLConnection link = (URL.HttpURLConnection)url.openConnection();
link.setRequestMethod("POST");
...
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/7bc3ae39-74dd-4826-b2cc-edb19377165en%40googlegroups.com.