?????????????
?????????????
1 #import "YYViewController.h"
2 #import "ASIHTTPRequest.h"
3
4 @interface YYViewController ()
5
6
7 @end
8
9 @implementation YYViewController
10
11 - (void)viewDidLoad
12 {
13     [super viewDidLoad];
14 }
15
16 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
17 {
18     //????????????????
19     [self download];
20 }
21
22 #pragma mark-???????
23 -(void)download
24 {    //1.???????????
25     NSURL *url=[NSURL URLWithString:@"http://127.0.0.1:8080/MJServer/resources/video.zip"];
26     ASIHTTPRequest *request=[ASIHTTPRequest requestWithURL:url];
27
28     //2.???????????????????е??????
29     [request setDataReceivedBlock:^(NSData *data) {
30         NSLog(@"%d"??data.length);
31     }];
32
33     //3.??????????????
34     [request startAsynchronous];
35 }
36
37 @end
??????????????????????????????????????????????????????????????????????????
?????????????£?

?????????????????в?????????????????????????????????????????????????н??е?????????????????????????????????????汬???