How to use this document
The document is divided and described according to the URL load class. To determine which API to use, read the URL Loading. When you are sure which API to use, read the section that is relevant to it:
- Use the Nsurlsession class to asynchronously get the content specified by the URL into memory or download to a file, read using Nsurlsession. Then read the life Cycle of a URL session to learn more about how it interacts with its agents.
- Use the Nsurlconnection class to asynchronously get the content specified by the URL to memory, read the using Nsurlconnection.
- To download to a file asynchronously using the Nsurldownload (class on OS X only) class, read using Nsurldownload.
After you have read one or more of the relevant chapters, you should read the following chapters related to "Nsurlsession, Nsurlconnection, Nsurldownload" three:
- Encoding URL Data, explaining to you how to encode a string.
- Handling redirects and other request changes describes the steps you should take to change the URL request.
- Authentication challenges and TLS Chain validation illustrates the authentication of your connection request on the server side.
- Understanding Cache Access Describes how a connection uses the cache during a request.
- The cookies and custom protocols describe the related classes that manage cookie storage and customize the application layer protocol.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
How to use this document