I have created the connection to server using “Https” protocol. Here is my code…
String httpsURL = "https://abc.com/auth/login/";
HttpsURLConnection con = null;
try{
URL url = new URL(httpsURL);
con = (HttpsURLConnection) url.openConnection();
con.setRequestMethod("POST" );
con.setDoInput(true);
con.setDoOutput(true);
con.connect();
//String respMessage = con.getResponseMessage();
//int respCode = con.getResponseCode();
}catch(....){....}
Now i have to send my JSON object to server over that connection. How can i do that? Please Help me. Thanks in advance.
Maybe this could be helpful… I don’t know the specific use for your code.