private static String requestWithAuth(Context context, String method, String path, String content)
      throws IOException, AuthenticationException {
    String authToken = null;
    if (context != null) {
      authToken = getAuthenticationToken(context);
    }

    ServerRequest serverRequest = new ServerRequest(APPKEY, authToken);
    return serverRequest.request(method, ROOTAPIPATH + path, content);
  }
  public static HttpURLConnection setupConnectionWithAuth(
      Context context, String method, String path, String content)
      throws IOException, AuthenticationException {
    String authToken = null;
    if (context != null) {
      authToken = getAuthenticationToken(context);
    }

    ServerRequest serverRequest = new ServerRequest(APPKEY, authToken);
    return serverRequest.setupConnection(method, ROOTAPIPATH + path, content);
  }