/** * 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; }
/** * 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)); }