|Aug 21, 2008, 10:52 AM||#1|
launching mobile safari with a POST request
was anybody successful in creating a POST request to be submitted to mobile safari? i feel like i'm doing the right thing, yet the server receives a GET instead of a POST.
#define BASE_URL @"http://m.someserver.com" // create url object NSString *urlString; NSURL *url; urlString = [NSString stringWithFormat: @"%@/showpost.php", BASE_URL]; url = [NSURL URLWithString: urlString]; // create the request NSMutableURLRequest *postRq = [NSMutableURLRequest requestWithURL: url]; [postRq setHTTPMethod: @"POST"]; NSLog(@"method: %@", [postRq HTTPMethod]); // call safari with the url thus built [[UIApplication sharedApplication] openURL: url];
|Aug 22, 2008, 08:50 AM||#3|
Yes, it doesn't make much sense to send somebody to Safari using a POST - they should be GETting something. If you just need to submit data to a server, create a POST request inside of your app as suggested above.
|Aug 27, 2008, 05:02 PM||#4|
well, adding a web view was pretty straightforward. now the delicate part is that every link in the web view will also open in the web view. at one point i need to get out of my app and use safari. anybody knows how to do that? i guess hunting for <a href=...> tags in the response, but how can you get the response?... hmm.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|AT&T's 'Mobile Share' Service Plans Launching August 23||MacRumors||MacRumors.com News Discussion||245||Oct 25, 2014 05:52 PM|
|AT&T Launching New 'Mobile Share Value Plans' with Monthly Discount, 18-Month 'AT&T Next' Option||MacRumors||MacRumors.com News Discussion||133||Dec 16, 2013 10:37 AM|
|China Mobile Launching New Brand on December 18, Fueling Rumors of iPhone Debut||MacRumors||iOS Blog Discussion||3||Nov 21, 2013 10:55 PM|
|Virgin Mobile USA Launching iPhone on June 29 with Plans Starting at $30||MacRumors||MacRumors.com News Discussion||224||Jul 26, 2013 07:17 AM|
|Safari not launching||bmorris||Mac OS X 10.7 Lion||0||Jan 9, 2013 01:00 PM|
All times are GMT -5. The time now is 10:52 PM.