zoukankan      html  css  js  c++  java
  • IOS AFNETWORKING POST

    IOS AFNETWORKING POST 请求

            #pragma mark post 请求
            // 获取 url 路劲,不带参数
            NSString *requestUrl = [[url componentsSeparatedByString:@"?"] objectAtIndex:0];
            
            // url参数截取
            NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithCapacity:10];
            NSArray *parameArray = [[[url componentsSeparatedByString:@"?"] objectAtIndex:1] componentsSeparatedByString:@"&"];
            
            for (int i = 0; i < [parameArray count]; i++) {
                
                NSString *key = [[[parameArray objectAtIndex:i] componentsSeparatedByString:@"="] objectAtIndex:0];
                NSString *value = [[[parameArray objectAtIndex:i] componentsSeparatedByString:@"="] objectAtIndex:1];
                
                [dic setObject:value forKey:key];
            }
            
            AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
            
            [manager POST:requestUrl parameters:dic success:^(AFHTTPRequestOperation *operation, id responseObject) {
                
                NSString *html = operation.responseString;
                
                NSString *js = [NSString stringWithFormat:@"%@(%@);",method,html];
                [self.webView stringByEvaluatingJavaScriptFromString:js];
                
            } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
                
                
                NSLog(@"AFHTTPRequestOperationManager:发生错误!%@",error);
            }];
  • 相关阅读:
    oracle用户和权限
    oracle中的索引
    oracle中的序列
    oracle中的视图
    oracle PL/SQL块
    oracle创建表案列
    半导体随机存储器
    IEEE754标准
    定点数的移位操作
    真值,原码,反码以及补码和移码总结
  • 原文地址:https://www.cnblogs.com/duke-cui/p/4798709.html
Copyright © 2011-2022 走看看