asihttprequest

Maintaining session in after closing UIWebView

本小妞迷上赌 提交于 2019-12-08 13:40:35
I have an application which has a login page resides on the application server. So I open a UIWebView to handle the login. After then I want to switch to the UIView and make API calls using ASIHttp library (others may also be acceptable). The problem is; after I login server keeps session object for authentication purpose, so when I close the UIWebView and switch to a UIView and make an API call, it fails. I believe, somehow I need to maintain session object (set after login) in the API calls. How can I achieve this? Here are the steps I followed: Extract the cookies in UIWebView using

upload images and texts to server [closed]

▼魔方 西西 提交于 2019-12-08 12:57:28
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center . Closed 7 years ago . I have already gone through some codings, and I found some interrupts in uploading. I want to upload six images to a server folder and some text to server database using ASIHTTPRequest . Any sample code please, thanks for spending time for my question. For uploading images to the server you need the following

Use the activity indicator With ASIHTTPrequest

只谈情不闲聊 提交于 2019-12-08 10:58:14
问题 i'm using ASIHTTPRequest in asynchrone mode and i want to show an Activity Indicator . In they website they say : Disabling automatic updates to the network activity indicator (iOS only) By default, ASIHTTPRequests will show the network activity indicator (in the status bar) on iOS devices when requests are using the network. If you prefer to manage this yourself, you can disable these updates: [ASIHTTPRequest setShouldUpdateNetworkActivityIndicator:NO]; But i dont wan't to show it in statuts

How to call the local image file and display into the imageviewcontroller

大城市里の小女人 提交于 2019-12-08 10:15:32
问题 I create the one application in that create the locally store the file in payment while the application not be deleted. This I have done: I download the file and store into locally (applications document folder). Now I am having trouble with this: While the after the image is downloaded then I fetch into locally and that image will not display. In NSLog following url is generated and i can't display the image. /Users/username/Library/Application%20Support/iPhone%20Simulator/5.0/Applications

How we Can post Video and Image in ASIHTTPRequest?

依然范特西╮ 提交于 2019-12-08 09:07:27
问题 I want to post one image to my webservice and one video too , but problem is that when it go to video part it give me Excess-bad Error NSString *url = [NSString stringWithFormat:@"http://example.com/add_videoxml.php"]; networkQueue = [[ASINetworkQueue alloc] init]; [networkQueue cancelAllOperations]; [networkQueue setShowAccurateProgress:YES]; //[networkQueue setUploadProgressDelegate:progressBar]; [networkQueue setDelegate:self]; [networkQueue setRequestDidFinishSelector:@selector

Multiple ASIHTTPRequests

自古美人都是妖i 提交于 2019-12-08 09:05:22
问题 I have realized that these two urls do not returns data at the same time. I would like to know how I could able to make sure that urls return at the same time. How could I able to change this code to GCD. Is that recommended? I have created dispatch queue in the code but it does not plot anything, not working. without GCD it works but it does not return at the same time. Any help would be appreciated! -(void)httpRequest{ _weak ASIHTTPRequest *request1 = [ASIHTTPRequest requestWithURL:url1];

Posting JSON from iOS to Rails 3.1 (Stringify_keys error)

允我心安 提交于 2019-12-08 07:28:29
I'm trying to create a user acount on my rails backend via json from an iPhone app. Here is what is currently being posted to the server: Started POST "/patients" for 127.0.0.1 at 2011-11-27 20:52:29 -0800 Processing by PatientsController#create as HTML Parameters: {"patient"=>"{\"password\":\"password\",\"password_confirmation\":\"password\",\"email\":\"testagain\"}"} WARNING: Can't verify CSRF token authenticity Completed 500 Internal Server Error in 1ms NoMethodError (undefined method `stringify_keys' for #<String:0x00000104a354f8>): app/controllers/patients_controller.rb:43:in `new' app

Add UIProgressView to a NSURLConnection?

巧了我就是萌 提交于 2019-12-08 06:49:46
问题 Is it possible to add a UIProgressView to a NSURLConnection? Is it as simple as getting the length of the data and then setting it to an int then sending that int to my other class to my UIProgressView? Can someone show me how to do this? Are there any examples or links that will point me in the right direction? Thanks!!! 回答1: In your didReceiveResponse function you could get the total filesize like so - _totalFileSize = response.expectedContentLength; . In your didReceiveData function you

upload images and texts to server [closed]

前提是你 提交于 2019-12-08 06:14:56
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have already gone through some codings, and I found some interrupts in uploading. I want to upload six images to a server folder and some text to server database using ASIHTTPRequest . Any sample code please,

How to make ASIHTTPRequest support oauth2?

半城伤御伤魂 提交于 2019-12-08 04:02:18
问题 I need to use ASIHTTPRequest , but it is not support oauth2 protocol .If there is a way to make ASIHTTPRequest to support oauth2? 回答1: You should take a look at What's the best iOS OAuth2 framework question here on StackOverflow. There MattDiPasquale mentioned the FROAuth2Request project on github which does exactly what you're looking for. It adds OAuth2 support to ASIHTTPRequest. 回答2: OAuth is not a protocol as, for example, HTTP or FTP, but builds ontop of HTTP and adds authentication. So