Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot send string request to server in IOS(weird)
    primarykey
    data
    text
    <pre><code>NSURL *URL=[NSURL URLWithString:@"http://xxx.aspx"]; NSString *request=@"__EVENTTARGET=17&amp;__EVENTARGUMENT=25"; NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL:URL]; [urlRequest setHTTPMethod:@"POST"]; [urlRequest setHTTPBody:[request dataUsingEncoding:NSUTF8StringEncoding]]; NSString *returnString = [[NSString alloc] initWithData: [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil error:nil] encoding:NSUTF8StringEncoding]; NSLog(@"%@",returnString); </code></pre> <p>When I'm trying to send just <code>NSString *request=@"__EVENTTARGET=%@&amp;__EVENTARGUMENT=25"</code>; Everything is working! It logs generated html code.</p> <p>BUT! when I'm trying this one(Everything the same except I have to send token from EditText):</p> <pre><code>NSString *token=@"23"; //23 from edit for example NSURL *URL=[NSURL URLWithString:@"http://xxx.aspx"]; NSString *request=[NSString stringWithFormat:@"__EVENTTARGET=%@&amp;__EVENTARGUMENT=25",token]; NSMutableURLRequest *urlRequest=[NSMutableURLRequest requestWithURL:URL]; [urlRequest setHTTPMethod:@"POST"]; [urlRequest setHTTPBody:[request dataUsingEncoding:NSUTF8StringEncoding]]; NSString *returnString = [[NSString alloc] initWithData: [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil error:nil] encoding:NSUTF8StringEncoding]; NSLog(@"%@",returnString); </code></pre> <p>It logs just xxx.aspx html code as I never sent anything</p> <p>Weird! Does anyone know what the problem?? Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload