1 一、ASI类库集成:
2 1.添加源代码文件
3 ASIAuthenticationDialog.h
4 ASIAuthenticationDialog.m
5 ASICacheDelegate.h
6 ASIDataCompressor.h
7 ASIDataCompressor.m
8 ASIDataDecompressor.h
9 ASIDataDecompressor.m
10 ASIDownloadCache.h
11 ASIDownloadCache.m
12 ASIFormDataRequest.h
13 ASIFormDataRequest.m
14 ASIHTTPRequest.h
15 ASIHTTPRequest.m
16 ASIHTTPRequestConfig.h
17 ASIHTTPRequestDelegate.h
18 ASIInputStream.h
19 ASIInputStream.m
20 ASINetworkQueue.h
21 ASINetworkQueue.m
22 ASIProgressDelegate.h
23
24 2.添加依赖的Reachability:
25 Reachability.h
26 Reachability.m
27
28 3.添加依赖的类库:
29 libz.dylib
30 MobileCoreServices.framework
31 SystemConfiguration.framework
32 CFNetwork.framework
33
34 二、GET请求
35 1.使用ASIHTTPRequest
36 2.发送同步请求:startSynchronous
37 3.发送异步请求:startAsynchronous
38
39 三、POST请求
40 1.使用ASIFormDataRequest
41 2.添加POST请求参数:addPostValue:forKey: