public String postRequest(String request, String uri, String data) {

        StringBuffer response = new StringBuffer();

        try
        {

        String url = uri;
        java.net.URL obj = new java.net.URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();

        //add request header
        con.setRequestMethod("POST");
        con.setRequestProperty("User-Agent", "");
        con.setRequestProperty("Accept-Language", "en-US,en;q=0.5");


        String urlParameters = data;

        // Send post request
        con.setDoOutput(true);
        DataOutputStream wr = new DataOutputStream(con.getOutputStream());
        wr.writeBytes(urlParameters);
        wr.flush();
        wr.close();

        int responseCode = con.getResponseCode();

        BufferedReader in = new BufferedReader(
                new InputStreamReader(con.getInputStream()));
        String inputLine;

        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();

        }
        catch(MalformedURLException e)
        {

        }
        catch(ProtocolException e)
        {

        }
        catch(IOException e)
        {

        }

        return response.toString();


    }