AFNet post 时增加参数

    AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:metaurl];
    [httpClient registerHTTPOperationClass:[AFJSONRequestOperation class]];
    [httpClient setDefaultHeader:@"Accept" value:@"application/json"];
     NSDictionary *params = @{@"v":@"1", @"action":@"getMetaInfo",@"appid":@"8000",@"curVer":@"1",@"tabid":@"0",@"localName":@"bj"};
     NSMutableURLRequest *request = [httpClient requestWithMethod:@"POST" path:nil parameters:params];
    
    NSDictionary *params = @{@"v":@"1", @"action":@"getMetaInfo",@"appid":@"8000",@"curVer":@"1",@"tabid":@"0",@"localName":@"bj"};
    NSMutableURLRequest *request = [httpClient requestWithMethod:@"POST" path:nil parameters:params];

你可能感兴趣的:(AFNet post 时增加参数)