I'm wondering why this HTTP post request is not working in my iPhone app.
I know about the fact that the URL is correct and the variable I am sending is correct but for some reason the request is not being received from the .aspx
page is.
Edit:
I do not call the code again but representative methods in my own class, with their own representative methods is.
The class is said in such a way:
URLCallClass * Reporter = [[[URL Colossal Alloc] Inte] AutoShare]; [Reporter posted: @ "http: //mysite/page.aspx" parameter: httpBodyString];
And this is the actual class:
- (zero) Sent: (NSString *) Server parameter: (NSString *) parameter {NSWR * Url = [[NSWR Alok] initWithString: Server]; NSMutableURLRequest * urlRequest = [NSMutableURL request request withURL: url]; [Url release]; [UrlRequest setHTTPMethod: @ "post"]; [UrlRequest Set HTTPBD: [Parameter Data Wrapping Encoding: NSUTF 8 String Encoding]]; ConnectionResponse = [[[NSURLConnection alloc] initWithRequest: urlRequest delegate: self] autorelease]; // NSURL connection connection * Response = [[NSURL connection alloted] initWithRequest: urlRequest delegate: self]; If (! Connection Connection) {NSLog (@ "Failed to Submit Request"); } Other {NSLog (@ "--------- Report Request submitted ---------"); }} - (Zero) Connection: (NSURLConnection *) Connection Response Response: (NSURLResponse *) Response {NSLog (@ "Received Response"); } Connection (NSURLConnection *) connection: (NSDT * Failed with "); NSLog (@ "% @", [error description]); } - (zero) connectionDifffish: Loading: (NSURL connection connection) connection {nslog (@ "show promo view"); } - (Zero) Delok [[connectionResponse release]; [Super DeLoc]; }
You must apply the connection: didFailWithError: in the rep
NSLog (@ "% @", [error description]);
will show you what actually happened wrong.
Comments
Post a Comment