• ASIHTTPRequest documentation


    ASIHTTPRequest documentation

    Last updated: 15th May 2011 (v1.8.1)

    Using ASIHTTPRequest in an iOS project

    1) Add the files

    Copy the files you need to your project folder, and add them to your Xcode project. An overview of the ASIHTTPRequest source files appears here.

    If you aren't sure which files you need, it's best to copy all the following files:

    • ASIHTTPRequestConfig.h
    • ASIHTTPRequestDelegate.h
    • ASIProgressDelegate.h
    • ASICacheDelegate.h
    • ASIHTTPRequest.h
    • ASIHTTPRequest.m
    • ASIDataCompressor.h
    • ASIDataCompressor.m
    • ASIDataDecompressor.h
    • ASIDataDecompressor.m
    • ASIFormDataRequest.h
    • ASIInputStream.h
    • ASIInputStream.m
    • ASIFormDataRequest.m
    • ASINetworkQueue.h
    • ASINetworkQueue.m
    • ASIDownloadCache.h
    • ASIDownloadCache.m

    iPhone projects must also include:

    • ASIAuthenticationDialog.h
    • ASIAuthenticationDialog.m
    • Reachability.h (in the External/Reachability folder)
    • Reachability.m (in the External/Reachability folder)

    2) Link with CFNetwork, SystemConfiguration, MobileCoreServices, CoreGraphics and zlib

    Open the settings for your target by clicking on the blue bar at the very top of the Xcode sidebar:



    Open the Build Phases tab, expand the box labeled Link Binary With Libraries then click the plus button.



    Choose CFNetwork.framework from the list, and click Add:



    Repeat the last two steps to add the following: SystemConfiguration.frameworkMobileCoreServices.framework,CoreGraphics.framework and libz.dylib.

    Using ASIHTTPRequest in a Mac OS X project

    To use ASIHTTPRequest in a Mac project, you'll need to link against:

    • SystemConfiguration.framework + zlib (as above)
    • CoreServices.framework
      CFNetwork is part of the CoreServices framework on Mac OS X. Unless you are writing a console-based application, your application is probably already setup to link with CoreServices, but if not, simply add CoreServices.framework in the same way as described above.

    Building the tests

    Most users can skip this part!

    The tests that come with ASIHTTPRequest primarily exist for my benefit, so I can check I haven’t broken something when I make changes. You only need to run the tests if you are making changes to ASIHTTPRequest, or want to confirm that something is working as expected.

    ASIHTTPRequest uses Gabriel Handford’s wonderful GHUnit framework for running tests.

    As of v1.8-50, GHUnit is no longer included as a git submodule. Instead, build scripts automatically download a pre-compiled framework if one does not already exist locally. If you would prefer to build GHUnit yourself, simply grab a copy from GitHub, and drop your built framework in External/GHUnit.

    Some of the tests require additional information to run:

      • To run the S3 tests, you need to specify your S3 access details in the top of ASIS3RequestTests.m
      • To run the proxy tests, you need to specify details of your proxy server, and a PAC file if you want to run the PAC tests. Note that the proxy tests require a proxy server, while all the other tests require that you don't have a proxy server.
      • 复制地址:http://allseeing-i.com/ASIHTTPRequest/Setup-instructions
  • 相关阅读:
    Web——[HCTF 2018]WarmUp
    栈的设置+栈的越界问题+栈的极限大小
    栈的概念
    检测点3.1
    字节型数据和字型数据的小结
    汇编语言(王爽)学习记录_第一章
    sqli-labs less-1 --> less-4
    五角星
    STD二手图书交流平台团队博客-登陆问题的解决
    STD二手图书交流平台团队博客-界面构建
  • 原文地址:https://www.cnblogs.com/lv_yantao/p/3020237.html
Copyright © 2020-2023  润新知