iOS?????????????ASI?????????????
???????????? ???????[ 2015/7/3 13:59:00 ] ??????????????? ????
?????????????
?????????????
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
??????????????????????????????????????????????????????????????????????????
?????????????£?
?????????????????в?????????????????????????????????????????????????н??е?????????????????????????????????????汬???
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11