Search Results

Search found 103 results on 5 pages for 'nsmutableurlrequest'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • NSMutableURLRequest not obeying my timeoutInterval

    - by kubi
    I'm POST'ing a small image, so i'd like the timeout interval to be short. If the image doesn't send in a few seconds, it's probably never going to send. For some unknown reason my NSURLConnection is never failing, no matter how short I set the timeoutInterval. // Create the URL request NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://www.tumblr.com/api/write"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:0.00000001]; /* Populate the request, this part works fine */ [NSURLConnection connectionWithRequest:request delegate:self]; I have a breakpoint set on - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error but it's never being triggered. My images continue to be posted just fine, they're showing up on Tumblr despite the tiny timeoutInterval.

    Read the article

  • NSMutableUrlRequest eats plus signs

    - by Mike
    I create NSMutableUrlRequest for sending data to server, add all necessary fields to it and then add the string for sending like this: [theRequest setHTTPBody:[postString dataUsingEncoding: NSUTF8StringEncoding]]; postString is a usual NSString. The problem is, when I receive this request at the server, all the plus (+) signs disappear from the http body. So if I had "abcde+fghj" on iPhone, I get "abcde fghj" on the server". Can this be some encoding problem from using dataUsingEncoding: NSUTF8StringEncoding? Or some NSMutableUrlRequest stripping feature? What can I do to make it stop stripping plus signs? I need to receive UTF8 strings at the server side.

    Read the article

  • Explanation of NSMutableURLRequest : setHTTPMethod

    - by kkmoslehpour
    I am new to objective c programming. I am currently trying to insert data into mysql database. I have read a couple links on this and could not find the exact answer I am looking for. Here is what I am trying to do: I have my app that user inputs a name in a text field and once the press the add button, it makes a connection to my php file and my php file does the rest of the work (using POST method) and adds the name to the mysql dataase. I have seen a lot of people use NSMutableURLRequest : setHTTPMethod :POST`` in their code (in my case my php file does that and I don't haveNSMutableURLRequest` included in my code and it works perfectly fine.) My questions are: Are there any benefits of including NSMutableURLRequest in your code when you can just call your php code to take care of the POST for you? What does NSMutableURLRequest exactly do and which way is more efficient?

    Read the article

  • NSMutableURLRequest returns null on real device, while returning image on simulator

    - by Yanchi
    I was testing my app that I've been working on for past 2 months. Basically it requests for JSON, that contains info about items. One field of JSON file is image_url. When I want to display this image, I need to download it from another server, that needs additional credentials. So it goes like this- In my cellForRowAtIndexPath I'm doing NSDictionary *aucdict = [jsonAukResults objectAtIndex:indexPath.row]; NSURL *imageURL = [NSURL URLWithString:[aucdict objectForKey:@"img_url"]]; NSString *authPString = [[[NSString stringWithFormat:@"login:password"]dataUsingEncoding:NSUTF8StringEncoding] base64EncodedString]; NSString *verifPString = [NSString stringWithFormat:@"Image %@",authPString]; NSMutableURLRequest *Prequest = [[NSMutableURLRequest alloc] initWithURL:imageURL]; [Prequest setValue:verifPString forHTTPHeaderField:@"Authorization"]; NSError *error = nil; NSURLResponse *resp = nil; NSData *picresult = [NSURLConnection sendSynchronousRequest:Prequest returningResponse:&resp error:&error]; UIImage *imageLoad = [[UIImage alloc] initWithData:picresult]; Now, I just obscured credentials (they are not login:password :)). My problem is, that right now, I get 3 items. All 3 have image on same server. I can get two of them with this code no problem. However third one is problematic, I always get (NULL) imageLoad. On my simulator, everything works fine, I get all 3 pictures. On real device I get error. I tried to NSURLConnection with error and response so I could debug better. This is what I got in my error. Printing description of error: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server name” which could put your confidential information at risk." UserInfo=0x1e5a3080 {NSErrorFailingURLStringKey=pictureLink.jpg, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=pictureLink.jpg, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server name” which could put your confidential information at risk., NSUnderlyingError=0x1e5a30e0 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server name” which could put your confidential information at risk.", NSURLErrorFailingURLPeerTrustErrorKey=} I dont use SSL so Im really confused as what could cause this error. Btw, everything worked fine until now (this is my initial screen, so it's been done for good month and a half). Now I started to do graphics and this problem popped up :(

    Read the article

  • NSMutableURLRequest wont try to use 3G when 3G is not 'connected' in Reachability enumeration

    - by Kyle
    I won't bother posting any code because my code works fine when I launch Safari or something that turns on the 3G connection first. When I put it Airport mode, then put back OFF, I will get the behavior of a connection error saying No internet connection with NSMutableURLRequest. I've personally mailed apple about how the Ant gets turned on and off, and they said anything that uses their base CFSocketStream object will turn on the Ant, and I quote: "such as NSURLRequest".. BSD Sockets do not, just so everyone knows.. However, I assumed NSMutableURLRequest would fall into the category of 'Does', but it seems like it doesnt. It never succeeds for me when I cycle Airport or have the phone idle for a long time. It will ALWAYS succeed when I open any other network app first to turn the Ant on. Shall I be forced to do a dummy NSURLRequest call to turn this on; or has anyone been able to get this class working just fine? Remember this is just an implementation of NSMutableURLRequest to upload a file Async, and no other Network operations are performed anywhere; no ads, no version checks, no nothing.

    Read the article

  • NSMutableURLRequest wont turn on 3G

    - by Kyle
    I won't bother posting any code because my code works fine when I launch Safari or something that turns on the 3G connection first. When I put it Airport mode, then put back OFF, I will get the behavior of a connection error saying No internet connection with NSMutableURLRequest. I've personally mailed apple about how the Ant gets turned on and off, and they said anything that uses their base CFSocketStream object will turn on the Ant, and I quote: "such as NSURLRequest".. BSD Sockets do not, just so everyone knows.. However, I assumed NSMutableURLRequest would fall into the category of 'Does', but it seems like it doesnt. It never succeeds for me when I cycle Airport or have the phone idle for a long time. It will ALWAYS succeed when I open any other network app first to turn the Ant on. Shall I be forced to do a dummy NSURLRequest call to turn this on; or has anyone been able to get this class working just fine? Remember this is just an implementation of NSMutableURLRequest to upload a file Async, and no other Network operations are performed anywhere; no ads, no version checks, no nothing.

    Read the article

  • NSMutableURLRequest and a Password with special Characters won't work

    - by twickl
    I'm writing a small program (using Cocoa Touch), which communicates with a webservice. The code for calling the webservice, is the following: - (IBAction)send:(id)sender { if ([number.text length] > 0) { [[UIApplication sharedApplication] beginIgnoringInteractionEvents]; [activityIndicator startAnimating]; NSString *modded; modded = [self computeNumber]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL: [NSURL URLWithString:@"https://tester:%=&[email protected]/RPC2"]]; [theRequest setHTTPMethod:@"POST"]; [theRequest addValue:@"text/xml" forHTTPHeaderField:@"content-type"]; [theRequest setCachePolicy:NSURLCacheStorageNotAllowed]; [theRequest setTimeoutInterval:5.0]; NSString* pStr = [[NSString alloc] initWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><methodCall><methodName>samurai.SessionInitiate</methodName><params><param><value><struct><member><name>LocalUri</name><value><string></string></value></member><member><name>RemoteUri</name><value><string>sip:%@@sipgate.net</string></value></member><member><name>TOS</name><value><string>text</string></value></member><member><name>Content</name><value><string>%@</string></value></member><member><name>Schedule</name><value><string></string></value></member></struct></value></param></params></methodCall>", modded, TextView.text]; NSData* pBody = [pStr dataUsingEncoding:NSUTF8StringEncoding]; [theRequest setHTTPBody:pBody]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if (!theConnection) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"A Connection could not be established!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; [alert show]; [alert release]; sendButton.enabled = TRUE; return; } [pStr release]; [pBody release]; } } The Username and Password have to be in the URL, and it works in most cases, but when the password consists of special characters like in the example "%=&=-Test2009", the Webservice does not respond. If it is something like "Test2009" it works fine. Does anyone have an idea why, and maybe a solution for that?

    Read the article

  • NSMutableRequest skd problem

    - by user2164
    Hi, I am trying to make a web call with the iPhone. I have done this before and it works fine but now I can't make it work. I am trying to use the following method call which the documentation says is availble in 2.0 and later: - (void)addValue:(NSString *)value forHTTPHeaderField:(NSString *)field; I am attempting to build for version 3.2 and 4.0. NSMutableURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30]; [request addValue:@"0" forHTTPHeaderField:@"Content-Length"]; The error that I'm getting is a runtime error that says "-[NSURLRequest addValue:forHTTPHeaderField:]: unrecognized selector sent to instance 0x600e0c0" Can anyone tell me what I am missing that stops this code from working? Thanks.

    Read the article

  • Uploading UIImage to server using UIImageJPEGRepresentation

    - by Thomas Joos
    hi all, I'm writing an app which uploads a UIImage to my server. This works perfect, as I see the pictures being added. I use the UIImageJPEGRepresentation for the image data and configure an NSMutableRequest. ( setting url, http method, boundary, content types and parameters ) I want to display an UIAlertView when the file is being uploaded and I wrote this code: //now lets make the connection to the web NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; NSLog(@"return info: %@", returnString); if (returnString == @"OK") { NSLog(@"you are snapped!"); // Show message image successfully saved UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"You are snapped!" message:@"BBC snapped your picture and will send it to your email adress!" delegate:self cancelButtonTitle:@"OK!" otherButtonTitles:nil]; [alert show]; [alert release]; } [returnString release]; The returnString outputs: 2010-04-22 09:49:56.226 bbc_iwh_v1[558:207] return info: OK The problem is that my if statements does not say returnstring == @"OK" as I don't get the AlertView. How should I check this returnstring value?

    Read the article

  • iOS - NSURLConnection - Connecting to server and get Nonce

    - by Satyam svv
    I'm writing iOS application. There's a server related to some real estate. I've to send the following request to server to get the Nonce. GET /ptest/login HTTP/1.1 Method: GET User-Agent: MRIS API Testing Tool/2.0 Rets-Version: RETS/1.7 Accept: */* Host: ptest.mris.com:6103 Connection: keep-alive I'm using ASI HTTP with following code to post: [self setRequest:[ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"/ptest/login"]]]; [request addRequestHeader:@"User-Agent" value:@"CARETS-General/1.0"]; [request addRequestHeader:@"Rets-Version" value:@"1.7"]; [request addRequestHeader:@"Connection" value:@"keep-alive"]; [request addRequestHeader:@"Accept" value:@"*/*"]; [request addRequestHeader:@"Host" value:"ptest.mris.com:6103"]; [request setDelegate:self]; [request setDidFinishSelector:@selector(topSecretFetchComplete:)]; [request setDidFailSelector:@selector(topSecretFetchFailed:)]; [request startAsynchronous]; The response that I'm getting is Error: Unable to start HTTP connection Can some one point me how to establish successful connection?

    Read the article

  • How to find why NSMutableData is invalid

    - by 4thSpace
    I access a RESTFUL url and get back results. The results are in JSON. I turn the response into a string via: - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *json = [[NSString alloc] initWithBytes:[self.receivedData mutableBytes] length:[self.receivedData length] encoding:NSUTF8StringEncoding]; The json variable has a value of 0x0. When I mouse over it, I see <Invalid CFStringRef. How can I debug this to tell why it is invalid? I render the JSON given back through the browser in A JSON parser. That checks out fine. Results are given back by entering an ID in the URL. Other IDs return results without issue. The result set is fairly large.

    Read the article

  • Send parameters to a web service.

    - by Alejandra Meraz
    Before I start: I'm programming for Iphone, using objective C. I have already implemented a call to a web service function using NSURLRequest and NSURLConnection. The function then returns a XML with the info I need. The code is as follows: NSURL *url = [NSURL URLWithString:@"http://myWebService/function"]; NSMutableURLRequest theRequest = [[NSMutableURLRequest alloc] initWithURL:url]; NSURLConnection theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; i also implemented the methods didRecieveResponse didRecieveAuthenticationChallenge didRecievedData didFailWithError connectionDidFinishLoading. And it works perfectly. Now I need to send 2 parameters to the function: "location" and "module". I tried using the following modification: NSMutableURLRequest theRequest = [[NSMutableURLRequest alloc] initWithURL:url]; [theRequest setValue:@"USA" forHTTPHeaderField:@"location"]; [theRequest setValue:@"DEVELOPMENT" forHTTPHeaderField:@"module"]; NSURLConnection theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; But it doesn't seem to work. I'm doing something wrong? is there a way to know if I'm using the wrong names for the parameters (as maybe it is "Location" or "LOCATION" or it doesn't matter?)? or a way to know which parameters is the function waiting for... Extra info: I don't have access to the source of the web service so I can't modify it. But I can access the WSDL. The person who made the function say is all there... but I can't make any sense of it .< Any help would be appreciated. :)

    Read the article

  • How i finding Internate network error using Try..........Catch in iphone?

    - by Rajendra Bhole
    Hi, I developing an application in which i calling web services on iphone. I want to implement Try.......Catch in that code for catching internet and GPRS connection error.The code is as follow, NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:mainURL5]]; [request setHTTPMethod:@"POST"]; NSHTTPURLResponse* urlResponse = nil; NSError *error = [[[NSError alloc] init] autorelease]; NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&error]; result5 = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; I was using Try......catch but it didn't work that code as follows, @try { //prepar request NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:mainURL5]]; [request setHTTPMethod:@"POST"]; NSHTTPURLResponse* urlResponse = nil; NSError *error = [[[NSError alloc] init] autorelease]; NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&urlResponse error:&error]; result5 = [[NSMutableString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; } @catch(NSException * e) { [clsMessageBox ShowMessageOK:@"some text" :[e reason]]; }

    Read the article

  • How to add lowercase field to NSURLRequest header field?

    - by Drewsmits
    I'm getting pretty frustrated figuring out how to add a lowercase header field to an NSMutableURLRequest. NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:MyURLString]]; [urlRequest setValue:@"aValue" forHTTPHeaderField:@"field"]; In the example above, "field" get's switched to "Field," since the header field names are case insensitive. I wouldn't think this should happen, but it does. The API I am working with is case sensitive, so my GET request is ignored. Is there any way to override the case switch? Thanks

    Read the article

  • Send custom headers with UIWebView loadRequest

    - by Thomas Clayson
    I want to be able to send some extra headers with my UIWebView loadRequest method. I have tried: NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://www.reliply.org/tools/requestheaders.php"]]; [req addValue:@"hello" forHTTPHeaderField:@"aHeader"]; [self.theWebView loadRequest:req]; I have also tried subclassing the UIWebView and intercepting the - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType method. In that method I had a block of code which looked like this: NSMutableURLRequest *newRequest = [request mutableCopy]; for(NSString *key in [customHeaders allKeys]) { [newRequest setValue:[customHeaders valueForKey:key] forHTTPHeaderField:key]; } [self loadRequest:newRequest]; But for some unknown reason it was causing the web view to not load anything (blank frame) and the error message NSURLErrorCancelled (-999) comes up (all known fixes don't fix it for me). So I am at a loss as to what to do. How can I send a custom header along with a UIWebView request? Many thanks!

    Read the article

  • uiwebview memory leaks

    - by Nnp
    i am getting following memory leaks for webview initWebUILocalStorageSupport MobileQuickLookLibrary() and here is my code, i dont know what i am missing. NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10.0f]; [theRequest setHTTPMethod:@"POST"]; NSData *data = [self GenerateData]; if (data) { [theRequest setHTTPBody:data]; } [webView loadRequest:theRequest]; i hope my question is clear.thanks

    Read the article

  • what is the procedure of performing wsdl parsing in iphone?

    - by Ankit Vyas
    i have performed like this Is there any thing wrong performed by me? NSURL *url = [NSURL URLWithString:@"http://111.111.111.111/BattleEmpire.Service/ApplicationService.svc?wsdl"]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; [theRequest setHTTPMethod:@"GET"]; NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if(theConnection) { webData = [[NSMutableData data] retain]; NSLog( @"connection established"); } else { NSLog(@"theConnection is NULL"); }

    Read the article

  • Getting SHOUTcast metadata on the Mac

    - by Fernando Valente
    I'm creating an application in Objective-C and I need to get the metadata from a SHOUTcast stream. I tried this: NSURL *URL = [NSURL URLWithString:@"http://202.4.100.2:8000/"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL]; [request addValue:@"1" forHTTPHeaderField:@"icy-metadata"]; [request addValue:@"Winamp 5/3" forHTTPHeaderField:@"User-Agent"]; [request addValue:@"audio/mpeg" forHTTPHeaderField:@"Content-Type"]; [NSURLConnection connectionWithRequest:request delegate:self]; I would have to get the headers from this request in order to get the information, right? Unfortunately it keeps returning these headers: Date = "17 Apr 2010 21:57:14 -0200"; "Max-Age" = 0; What I'm doing wrong?

    Read the article

  • is it possible to request UIWebView using user agent as Safari on iPhone?

    - by RAGOpoR
    i try to request on my application via this url http://reader.mac.com/mobile/v1/http%3A%2F%2Ffeeds.feedburner.com%2F9To5Mac-MacAllDay and it also return that it available on iPhone only how can i fix it? mycode NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString: myurl]]; [urlRequest setValue: @"iPhone" forHTTPHeaderField: @"Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16"]; [self.myWebView loadRequest:urlRequest];

    Read the article

  • How to handle float values in a plist

    - by Banjer
    I'm reading in a plist from a web server, generated with some php. When I read that into an NSArray in my iphone app, and then spit the NSArray out with NSLog to check it out, I see that the float values are treated as strings. I would like the "distance" values to be treated as numeric and not strings. This plist is displayed in a table view where it can be sorted by distance, but the problem is is distance is sorted as a string, so I get some funny sorting results. Can I convert the distance values to float from string in the NSArray? Or maybe theres a simpler solution like tweaking the plist definition, or maybe something in the NSMutableURLRequest code? My plist looks like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>name</key> <string>Pizza Joint</string> <key>distance</key> <string>2.1</string> </dict> <dict> <key>name</key> <string>Burger Kang</string> <key>distance</key> <string>5</string> </dict> </array> </plist> After reading it into an NSArray, it looks like this per NSLog: result: ( { distance = "2.1"; name = "Pizza Joint"; }, { distance = 5; name = "Burger Kang"; } ) Here is the Objective-C code that retrieves the plist: // Set up url request // postData and postLength are left out, but I can post in this question if needed. NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:@"http://mysite.com/get_plist.php"]]; [request setHTTPMethod:@"POST"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/x-www-form-urlencoded charset=utf-8" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSError *error; NSURLResponse *response; NSData *result = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; NSString *string = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; // libraryContent is an NSArray self.libraryContent = [string propertyList]; NSLog(@"result: %@", self.libraryContent);

    Read the article

  • Handling credit cards and IOS

    - by Susan Jackie
    I am using NSUrlConnection asyncronous request to transmit credit card information to a secure third party server. I do the following: I get the credit card number, cvv, etc from the uitextfields. Encode the credit card information into a json format. Set as httpd body of the nsurlconnection request as follows: NSURL * url = [[NSURL URLWithString: "https://www.example.com"]; NSMutableURLRequest * request = [[NSMutableURLRequest alloc] initWithURL: url]; [request setHTTPMethod: @"POST"]; [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody: [NSJSONSerialization dataWithJSONObject: params options: kNilOptions error: &parseError]]; Send this information via asynchronous request to a secure third party server: [NSURLConnection sendAsynchronousRequest:request queue: queue completionHandler:^(NSURLResponse *response, NSData *data, NSError * requestError) { What should I be considering to send user credit card information to a third party server using nsurlconnection asynchronous request?

    Read the article

  • Posting a jaiku using xcode

    - by frameworkguy
    NSMutableURLRequest *jaikuRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://api.jaiku.com/json"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [jaikuRequest setHTTPMethod:@"POST"]; NSString *jbody= [NSString stringWithFormat:@"method=presence.send&user=XXusernameXX&personal_key=XXpersonalkeyXX&message=%@", encodedMsg]; [jaikuRequest setHTTPBody:[[NSString stringWithFormat:jbody] dataUsingEncoding:NSASCIIStringEncoding]]; I wrote the above code snippet to be able to post a jaiku on jaiku.com. I've come across similar samples in other languages for posting a jaiku. However i get the following response in the console: {"status": "error", "message": "Invalid API user", "code": 0} what could be the error or if im wrong, what is the correct approach to posting a jaiku using xcode?

    Read the article

  • shoutcast pls forbidden for iPhone programatically?

    - by Nareshkumar
    I have been trying to access the pls file data from shoutcast for some testing but the response seems to be forbidden and i am getting 403 as response. here is the code NSURL *myurl = [NSURL URLWithString:@"http://yp.shoutcast.com/sbin/tunein-station.pls?id=9944"] ; //Accept:*/* NSMutableURLRequest *myrequest = [[NSMutableURLRequest alloc]initWithURL:myurl]; [myrequest setValue:@"*/*" forHTTPHeaderField:@"Accept"]; //NSURL *myurl = [NSURL URLWithString:@"http://www.google.com"]; NSURLConnection *theConnection = [[NSURLConnection alloc]initWithRequest:myrequest delegate:self]; On the response, it was showing a 403 and no data is received. I tried to check the content-type and it was showing audio/x-scpls Can someone help me solve this issue please?

    Read the article

  • PHP script to process NSURLRequest from iphone

    - by tech74
    Hi, i will be sending a POST request to login.php on my server from an iphone app over HTTPS. The POST is created using NSMutableURLRequest. Is there an example of a PHP script to process this POST on my server. The POST isn't sent as a form as such , anyway not that i think it is. Not sure how NSMutableURLRequest formats this. I just need to know how to access the POST data on the server with the php script. All the examples ive seen regarding php scripts processing POSTS seem to be do with forms. So how do i process this? Any links etc most welcome. Thanks

    Read the article

1 2 3 4 5  | Next Page >