How get response status
<p>All good day!</p>

<p>Example code:</p>

<pre><code>        try {
            URL object = new URL(url);
            HttpURLConnection con = (HttpURLConnection) object.openConnection();
            con.setDoOutput(true);
            con.setDoInput(true);
            con.setRequestProperty("Content-Type", "application/json; charset=utf-8");
            con.setRequestProperty("Accept", "application/json; charset=utf-8");
            con.setRequestMethod("POST");
            OutputStreamWriter wr= new OutputStreamWriter(con.getOutputStream());
            wr.write(json);
            wr.flush();
            InputStream inputStream = con.getInputStream();
            BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
            String line = "";
            while ((line=reader.readLine()) != null) {
                response += "\n" + line;
            }
</code></pre>

<p>How to get the status of a response?
Please, help!</p>