zoukankan      html  css  js  c++  java
  • AFNetworking HTTP响应头返回数据

    //发送验证码

                NSLog(@"发送验证码");

                AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];

                NSMutableDictionary *sendDict = [[NSMutableDictionary alloc ]init];

                

                [sendDict setValue:_phoneTextField.text forKey:@"mobile"];

                

                [manager POST:[NSString stringWithFormat:@"%@%@",HOST_URL,REGISTER_TEST_URL] parameters:sendDict success:^(AFHTTPRequestOperation *operation, id responseObject) {

                         //这里是判断响应头返回的数据

                    if (operation.response.statusCode==200) {

                        [self success:responseObject];

                    }else{

                        //提醒框

                        UIAlertView *alter = [[UIAlertView alloc] initWithTitle:nil message:@"发送失败" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];

                        [alter show];

                    }

                    

                } failure:^(AFHTTPRequestOperation *operation, NSError *error) {

                    NSLog(@"%@",error.description);

                }];

     

    让明天,不后悔今天的所作所为
  • 相关阅读:
    影像数据的裁切和保存(源代码)
    C#读取EXIF信息类多
    C#里到底怎么样才能嵌入汇编?
    using和回收资源
    两个由栈组成的队列和两个由队列组成的栈
    C解两道题
    Inside WUAIntroduction
    轮子和做轮子
    致曾经整过的"框架"
    C#动态分配一维数组和二维数组函数
  • 原文地址:https://www.cnblogs.com/-yun/p/4747189.html
Copyright © 2011-2022 走看看