IOS 開發 網路詳解(10)--- AFNetWorking概述

來源:互聯網
上載者:User

標籤:roc   ogre   序列   default   let   network   nsurl   網路   method   

 

1.AF的initBaseUrl的調用棧

- [AFHTTPSessionManager initWithBaseURL:]    - [AFHTTPSessionManager initWithBaseURL:sessionConfiguration:]        - [AFURLSessionManager initWithSessionConfiguration:]            - [NSURLSession sessionWithConfiguration:delegate:delegateQueue:]            - [AFJSONResponseSerializer serializer] // 負責序列化響應            - [AFSecurityPolicy defaultPolicy] // 負責身份認證            - [AFNetworkReachabilityManager sharedManager] // 查看網路連接情況        - [AFHTTPRequestSerializer serializer] // 負責序列化請求        - [AFJSONResponseSerializer serializer] // 負責序列化響應

2.AF的get請求的調用棧

- [AFHTTPSessionManager GET:parameters:process:success:failure:]    - [AFHTTPSessionManager dataTaskWithHTTPMethod:parameters:uploadProgress:downloadProgress:success:failure:] // 返回 NSURLSessionDataTask #1        - [AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:] // 返回 NSMutableURLRequest        - [AFURLSessionManager dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:] // 返回 NSURLSessionDataTask #2            - [NSURLSession dataTaskWithRequest:] // 返回 NSURLSessionDataTask #3            - [AFURLSessionManager addDelegateForDataTask:uploadProgress:downloadProgress:completionHandler:]                - [AFURLSessionManagerTaskDelegate init]                - [AFURLSessionManager setDelegate:forTask:]    - [NSURLSessionDataTask resume]

IOS 開發 網路詳解(10)--- AFNetWorking概述

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.