asihttprequest

ASIHTTPRequest seems to cache JSON data always

心不动则不痛 提交于 2019-12-13 04:13:56
问题 I'm using ASIHTTPRequest API to get some JSON data from a web side. I'm using an asynchronous request without changing default cache properties. Code is as follows: __unsafe_unretained ASIHTTPRequest * request = [ASIHTTPRequest requestWithURL:url]; request.timeOutSeconds = 30; [request setCompletionBlock:^(void) { NSString *str = [request responseString]; /* * * */ }]; [request setFailedBlock:^(void) { NSLog(@"status: %@",[request responseStatusMessage]); NSLog(@"%@ : %@",[request url],[

Downloading file with ASIHTTPRequest - iPhone app

雨燕双飞 提交于 2019-12-13 00:27:00
问题 I am using the ASIHTTPRequest source code to download a file from a remote location. Surprisingly, the download happens but nothing happens after that. I have put in a log statement in the handleBytesAvailable method and can see the entire file worth of data is downloaded in parts and added to the fileDownloadOutputStream variable. But once all the bytes have been downloaded, nothing happens. The delegate methods are not called (neither fail, nor success). Can someone please tell me what is

How to store audio file in sqlite database in iOS

别等时光非礼了梦想. 提交于 2019-12-12 09:27:34
问题 I am developing an iPhone application for an audio player. I want to give some options to the user so they can listen to the song/music by streaming or they can download the audio file and store in sqlite database. I know how to stream the audio files in the app programmatically. But I don’t know how to store the downloaded audio file in sqlite database using BLOB. Additionally, after storing the audio file in the sqlite DB I need to fetch the audio file and play the song. How do I fetch the

Asihttprequest upload file

做~自己de王妃 提交于 2019-12-12 09:13:25
问题 imusing Asihttprequest to upload file to a server, i have 2 questions : the progressView is not moving smoothly, in fact it move to the and when upload is finish. when i try to upload a big image (> 2 mo approximately ) the upload fail . hers is my code : ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:@"http:xxxxx" ]]; [request setDownloadProgressDelegate:progresse]; [request setPostValue:@"upload" forKey:@"action"]; [request addData:[NSData dataWithData

About download file using ASIHttpRequest

元气小坏坏 提交于 2019-12-12 07:15:58
问题 I plan to use ASIHttpRequest for downloading files from back-end server. Before actions, post questions here to know more about this feature. As sample source codes given : ( demonstrate downloading remote JPG file ) ASIHTTPRequest *request; request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASIHTTPRequest/tests/images/small-image.jpg"]]; [request setDownloadDestinationPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]

UIProgressbar in UITableViewCell issue

左心房为你撑大大i 提交于 2019-12-12 04:03:27
问题 In my application, i have a tableview. And each cell contains, a UIButton, UIImageView and a UILabel. And when click on the button, a group of files will be downloaded using ASINetworkQueue, at this time the button will be replaced with UIProgressView. While the download progress, if I scroll the table, the app crashes. And I am getting the error point in ASIHTTPRequest.m class, + (void)updateProgressIndicator:(id *)indicator withProgress:(unsigned long long)progress ofTotal:(unsigned long

API to post on Tumblr

北城余情 提交于 2019-12-12 02:36:16
问题 I've been trying to upload an image to Tumblr from my iOS application for a little while now, but I can't get my method to work properly. My current method uses ASIHTTPRequest and OAuthConsumer according to this guide. However, I end up getting a 401 error (Authentication needed). You can find the explanation for my problem here. But my question is : Is there any other mean/API to post on Tumblr for iOS? I saw that OAuthConsumer was not fully functional on that side, and I didn't find

AFNetworking Incompatible block pointer types sending

杀马特。学长 韩版系。学妹 提交于 2019-12-12 02:22:30
问题 I am using AFNetworking to access a URL with Windows Authentication. I was using ASIHTTPRequest to login like so: -(BOOL)User:(NSString *)user andPassWordExists:(NSString *)password { NSURL *url = [NSURL URLWithString:kIP]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url]; [request setUseSessionPersistence:YES]; [request setUseKeychainPersistence:NO]; [request setUsername:user]; [request setPassword:password]; [request setDomain:@"domain"]; [request startSynchronous]; NSError

Here i am trying to call my ASIHTTP request in a GCD . But Completion block and failed blocks are not executing

我的未来我决定 提交于 2019-12-12 01:50:36
问题 Here i am trying to call my ASIHTTPRequest in a GCD. Sometimes the comletion blocks and failed blocks are not executing. What i want to do is, after this request finished, i have to use the returned data in a another ASIHTTPRequest . So how to improve this code: ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:url]]; [request setCompletionBlock:^{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ NSData *_responseData = [request

ASIHTTPRequest and Cyrillic letters

混江龙づ霸主 提交于 2019-12-12 01:41:38
问题 Good day, I'm working with ASIHTTPRequest, and I'm facing a problem with cyrillic letters in the request. I had this request: self.getUsersFromSearchRequest = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@&text=%@&count=20", SEARCH_FOR_USER, searchBar.text]]]; [self.getUsersFromSearchRequest setDelegate:self]; [self.getUsersFromSearchRequest startAsynchronous]; After this I have requestFinished: and requestFailed: methods: - (void)requestFinished: