iOS OC

iOS XMPP之群组获取

2018-06-27  本文已影响0人  流年小书
///********rest模拟数据解析*********///
AFHTTPRequestOperationManager * manager =[AFHTTPRequestOperationManager manager];
manager.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
 [manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];
 [manager.requestSerializer setValue:@"751Pyh33qbd1kDQS" forHTTPHeaderField:@"Authorization"];
 [manager GET:@"http://192.168.99.106:9090/plugins/restapi/v1/chatrooms" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
        _chatArray = [responseObject objectForKey:@"chatRoom"];


    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"%@",error);

    }];
上一篇下一篇

猜你喜欢

热点阅读