美文网首页iOS OC
iOS XMPP之群组获取

iOS XMPP之群组获取

作者: 流年小书 | 来源:发表于2018-06-27 10:46 被阅读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);
    
        }];
    

    相关文章

      网友评论

        本文标题:iOS XMPP之群组获取

        本文链接:https://www.haomeiwen.com/subject/xdhbyftx.html