**I have this code and I want to chage the Httpclient to HttpURLConnection , I have a problem with the setEntity method , I did not foud the equivqlent for HttpURLConnection **
public JSONObject postData(JSONObject jOb) throws Throwable {
 // Create a new HttpClient and Post Header
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("https://www.blabla");
try {
        httppost.setEntity(new StringEntity(jOb.toString()));
        HttpResponse response = httpclient.execute(httppost);
        String responseText = EntityUtils.toString(response.getEntity());
        return new JSONObject(responseText);
     } catch (Throwable e) {
        ControlTable.logErrors(e.toString() + "\t" + jOb.toString(), 32);
        throw e;
     }
}
 
     
    