@Nullable
  private <T> T executeMethod(@NotNull HttpUriRequest method, @NotNull ResponseHandler<T> handler) throws Exception {
    final HttpClient client = getHttpClient();
    final HttpResponse response = client.execute(method);
    final StatusLine statusLine = response.getStatusLine();
    if (statusLine.getStatusCode() != HttpStatus.SC_OK) {
      final Header header = response.getFirstHeader("Content-Type");
      if (header != null && header.getValue().startsWith("text/plain")) {
        final String entityContent = TaskResponseUtil.getResponseContentAsString(response);
        throw new Exception(TaskBundle.message("failure.server.message", StringUtil.capitalize(entityContent)));
      }
      throw new Exception(TaskBundle.message("failure.http.error", statusLine.getStatusCode(), statusLine.getStatusCode()));
    }
    return handler.handleResponse(response);
  }
@Nullable
  private <T> T executeMethod(@NotNull HttpUriRequest method, @NotNull ResponseHandler<T> handler)