so senden Sie ein array als parameter in Afnetwoking post-Methode?

Hallo brauche ich zum senden ein array als einer der parameter in Afnetworking Query-String

AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL    URLWithString:@"http://192.008.0.28/aaa/a/"]];

    NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: @"20", @"Miles", [NSArray arrayWithObjects:@"1",@"2",@"3",nil], @"Interval", nil];

    [httpClient postPath:iUpdateNotificationMethod parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSString *responseStr = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
        NSLog(@"Request Successful, response '%@'", responseStr);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"[HTTPClient Error]: %@", error.localizedDescription);
    }];

Aber der server-Seite haben wir "Meilen":20,"Intervalle":null, wie es zu beheben
Danke,

Ist es das, was Ihr sucht? stackoverflow.com/questions/11088025/...

InformationsquelleAutor sabeer | 2013-07-16

Schreibe einen Kommentar