public int code() throws HttpRequestException {
    try {
      closeOutput();
      return getConnection().getResponseCode();
    } catch (IOException e) {
      throw new HttpRequestException(e);
    }
  }
Get the status code of the response

@return the response code
@throws HttpRequestException
lib/src/main/java/com/github/kevinsawicki/http/HttpRequest.java