ASIHttpRequest

ASIHttpRequest
一点点积累吧,第一次写blog
最近在学习ASIHttpRequest
先认识一下ASIHttpRequest
如果要用到ASIHttpRequest先要向工程中加入 CFNetwork.framework
SystemConfiguration.framework, MobileCoreServices.framework, CoreGraphics.framework and libz.1.2.3.dylib
然后再工程中加入所用到的包ASIHttpRequest
接下来就可写代码了

#import  " TestAsiHttpreqeustViewController.h "
#import 
" ASIHTTPRequest.h "
@implementation TestAsiHttpreqeustViewController


- ( void )viewDidLoad
{
    ASIHTTPRequest
*request=[ASIHTTPRequest requestWithURL:[NSURL URLWithString:@" http://172.16.20.14:8090/test.html"]];
    [request setDelegate:self];
    [request startSynchronous];
}

- ( void )requestFinished:(ASIHTTPRequest  * )request
{
    NSString
*responseString=[request responseString];
    NSLog(responseString);
}

这只是一个很简单的ASIHttpRequest应用,我也在研究中,呵呵,希望对初学者有一点帮助

你可能感兴趣的:(ASIHttpRequest)