首页 > 其他 > 详细

ASDFASDFA

时间:2015-05-16 01:33:08      阅读:261      评论:0      收藏:0      [点我收藏+]
//设置HTTP Content-Length
    NSString *lenStr = [NSString stringWithFormat:@"%ld",request.HTTPBody.length];
    [request setValue:lenStr forHTTPHeaderField:@"Content-Length"];
    
    //设置HTTP Content-Type
    [request setValue:formData.contentType forHTTPHeaderField:@"Content-Type"];
    
    // 5.发送请求
    [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
       //处理请求结果
    }];


ASDFASDFA

原文:http://451143112.blog.51cto.com/10235476/1651780

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!