Ejemplo n.º 1
0
 /**
  * Prepares request for loading
  *
  * @return Prepared HttpUriRequest for that VKRequest
  */
 public HttpUriRequest getPreparedRequest() {
   HttpUriRequest request = VKHttpClient.requestWithVkRequest(this);
   if (request == null) {
     VKError error = new VKError(VKError.VK_REQUEST_NOT_PREPARED);
     provideError(error);
     return null;
   }
   return request;
 }
Ejemplo n.º 2
0
 /**
  * Cancel current request. Result will be not passed. errorBlock will be called with error code
  */
 public void cancel() {
   if (mLoadingOperation != null) mLoadingOperation.cancel();
   else provideError(new VKError(VKError.VK_CANCELED));
 }