Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>NSURL *url = [NSURL URLWithString:@"http://www.invoicera.com/app/api/check_json_api.php?token=7B92C122473A3D6F54E60D20AC5526D0"];</p> <pre><code>NSString *jsonRequest = [NSString stringWithFormat:@"&amp;json_data=%@",[[NSString stringWithFormat:@"{\"listInvoice\":{\"client_id\":\"\",\"date_from\":\"\",\"date_to\":\"\",\"invoice_number\":\"\",\"invoice_record_status\":\"\",\"invoice_status\":\"\",\"page\":\"1\",\"per_page_record\":\"20\"}}"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSLog(@"%@",jsonRequest); NSData *json_data = [NSData dataWithBytes:[jsonRequest UTF8String] length:[jsonRequest length]]; NSLog(@"%@",json_data); NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; [request setHTTPMethod:@"POST"]; [request setHTTPBody: json_data]; NSLog(@"%@",json_data); // [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; //[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setValue:[NSString stringWithFormat:@"%d", [json_data length]] forHTTPHeaderField:@"Content-Length"]; [request setHTTPBody:[[jsonRequest stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding] dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]]; </code></pre> <p>// [NSURLConnection connectionWithRequest:[request autorelease] delegate:self];</p> <pre><code>NSURLConnection *nsUrlConnection=[[NSURLConnection alloc] initWithRequest:request delegate:self]; // Successful connection. if (nsUrlConnection) { // [self initSpinner]; // [self spinBegin]; NSMutableData *data = [[NSMutableData alloc] init]; self.receivedData=data; [data release]; } // Unsuccessful connection. else { } // Clean up [url release]; [request release]; // Close keypad. </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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