title: Get Http Status Code with OkHttp
body: <p>I'm using OkHttp to get the content of some websites.</p>
  
  <p>However, I'm not able to get the Http-Status Code from the response.</p>
  
  <p>My Java-Code:</p>
  
  <pre><code>OkHttpClient client = new OkHttpClient();
  Request request = new Request.Builder()
                      .url("https://www.google.at")
                      .build();
  Response httpResponse = client.newCall(request).execute();    
  String html = httpResponse.body().string();
  </code></pre>
  
  <p>This method:</p>
  
  <pre><code>httpResponse.toString(); 
  </code></pre>
  
  <p>Returns the following content:</p>
  
  <pre><code>Response{protocol=http/1.1, code=200, message=OK, url=https://www.google.at}
  </code></pre>
  
  <p>Is there a way to get the statusCode as an integer, or do I need a Regular Expression to filter it out of this toString()-method?</p>