asihttprequest

Need help Cydia App Root Rights

血红的双手。 提交于 2019-12-26 03:50:54
问题 i tried to download a File with ASIHTPP. I tried on my jailbroken Ipad and see that the Code download a File but no in the Documet Folder. So what is wrong? In Xcode is not a Error only a Warning that the documtensdirectory a unused variable is. - (IBAction)grabURLInBackground:(id)sender { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSURL *url = [NSURL URLWithString:@" http://db.tt

Uploading Image to the web service - Beginner

本秂侑毒 提交于 2019-12-25 08:23:43
问题 I have to upload an image taken via the camera or uploaded via uiimagepickerview . I am using ASIHTTPRequest. ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; [request setFile:@"/Users/ben/Desktop/ben.jpg" forKey:@"photo"]; 1.) Since i am taking the photo from the iPhone camera or uploading it from the uiimagepickerview , i need to know what value should i set for setFile (replacement text for @"/Users/ben/Desktop/ben.jpg" ) ? 2.) I also need to test this application, so

ASIHttpRequest call Restful web service?

十年热恋 提交于 2019-12-25 06:44:27
问题 Can ASIHttpRequest call Restful web service ? I knew that Restkit is good at it. If no,any easy way to convert ? Can we say that ASIHttpRequest is good at calling soap based web service ? Thanks for your comments ! 回答1: ASIHTTPRequest simply does a HTTP request. Nothing more, nothing less. Since REST is also just an HTTP request, you can use ASIHTTPRequest just fine with a restful web service. It doesn't do any parsing of the response, though, so if the response is JSON you still have to

ASIHTTPRequest problem

微笑、不失礼 提交于 2019-12-25 04:31:17
问题 I have posted a question earlier but unfortunately I did not get any useful answer so I'll try in a different way. Here's the scenario. I've a simple WCF RESTful service set up on a hosted environment. I'm trying to communicate with this service from iphone 4. Here's what is working. I have two uri template set up. One for GET and one for POST. Running a console app on my local machine I'm able to GET and POST data. The data being extracted from the request and sent to a mysql database. On

Web Service sending information to iPhone

空扰寡人 提交于 2019-12-25 04:14:50
问题 I created a couple web services for my app as follows. 1. Allows a host device to send its information to the web service and will store it in a sql database. 2. Allows a client device to see all nearby devices based on the information in the sql database. I want the client to now be able to click one of the devices to connect to, which would then somehow link the two together. The question I have is right now my web services can only send a response to a device's request. What I want is if

iPhone: NSData and Byte conversation issue?

前提是你 提交于 2019-12-25 03:43:48
问题 I want to send iPhone image to server database. I wrote following code. I am getting data mismatch exception and not able to resolve it. Could anyone please help me out. Code on iPhone side: - (void) uploadUserInfo:(NSString*)userId profilePic:(UIImage*)profilePic { __block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL: [NSURL URLWithString:[NSString stringWithFormat:@"%@/%d/uploadUserInfo?cultureDetect=false", dataUrl, currentAppID]]]; [request setPostValue:userId forKey:

method not found error while accessing web service using asihttprequest

不问归期 提交于 2019-12-25 03:34:29
问题 I've created SOAP web service that would be accessible from Objective-C environment with ASIHTTPRequest library using JSON-RPC bridge . When I tested it from JavaScript everything where OK. But from Objective-C I got an error {"id":2,"error":{"code":591,"msg":"method not found (session may have timed out)"}} Web Service: @WebService() public class UserWS { /** * User data list - id, first name, last name, service number, username */ /** * Provides web service to get current user with waiter

asi-http-request asynchronous selector error

微笑、不失礼 提交于 2019-12-25 03:11:57
问题 I keep getting a very weird error when using asi-http-request when I use selectors to register callbacks for success and failure. The following methods are used: // Sets up a request and takes care of the stuff that needs to be for each // and every request. - (void) setup:(NSString *) fragment successCallback:(SEL) success_callback failureCallback:(SEL) failure_callback { // Convert the string to a url NSString *url = [[NSString alloc] initWithFormat:@"%@%@", self.server.serverUrl, fragment

Uploading an mp3 to my (php based) web server from an iPhone app

与世无争的帅哥 提交于 2019-12-24 23:47:48
问题 I'm looking to upload an mp3 file from my iPhone app to a given php page. To do this I found the ASIFormDataRequest class. Now I made a piece of code in my app like so: NSLog(@"fastBackwardButtonLoosened - sending the stuff"); NSString *theUrl = @"MyServerURL";//Sorry not showing this:) ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:theUrl]]; [request setFile:[soundFileURL absoluteString] forKey:@"mainfile"]; [request startSynchronous]; NSLog(@"The

NSString special characters encoding

断了今生、忘了曾经 提交于 2019-12-24 21:32:21
问题 Im trying to convert some special characters like ä , ö , ü , α , μ , α , ο , ι , and others from a webpage. When I download the page with the ASIHTTPRequest i get some codes instead of the character itself. Examples: ä = \u00E4 μ = \u03BC α = \u03B1 This also happens if I use [NSString stringWithContentsOfURL:aNSURL encoding:NSASCIIStringEncoding error:nil]; I have tried different encodings available but none of them work for the above example. For example: With the NSUnicodeStringEncoding I