使用标准Internet协议与URL进行交互及与服务端通信。


主题


第一步(First Steps)

1
class URLSession

一个协调一组相关网络数据传输任务的对象。(An object that coordinates a group of related network data transfer tasks.)

1
class URLSessionConfiguration

一个定义URL会话的行为和策略(policies)的配置对象。

1
class URLSessionTask

一个由URL会话(URL Session)承担的任务,如下载特定资源。


请求与响应(Requests and Responses)

1
struct URLRequest

一种与协议或URL scheme无关的URL加载请求。

1
class NSMutableURLRequest

一个表示与URLRequest桥接的URL加载请求的可变对象;当你需要参考语义或其他Foundation特定的行为时,请使用 NSMutableURLRequest。(A mutable object that represents a URL load request that bridges to
URLRequest; use NSMutableURLRequest when you need reference semantics or other Foundation-specific behavior.)

1
class URLResponse

与URL加载请求的响应相关联的元数据,与协议和URL scheme无关。

1
class HTTPURLResponse

与HTTP协议URL加载请求的响应相关联的元数据。


缓存行为(Cache Behavior)

1
class CachedURLResponse

一个缓存的URL请求的响应。

1
class URLCache

一个将URL请求映射到缓存的响应对象的对象。


验证和凭证(Authentication and Credentials)

1
class URLAuthenticationChallenge

一个来自服务器的需要客户端认证的挑战。

1
class URLCredential

一种身份验证凭证,由特定于凭证类型的认证信息和用来使用的持久存储类型组成,如果有的话。(An authentication credential consisting of authentication information specific to the type of credential and the type of persistent storage to use, if any.)

1
class URLCredentialStorage

管理凭证存储的对象。

1
class URLProtectionSpace

需要认证的服务器或服务器上通常称为领域的区域。(A server or an area on a server, commonly referred to as a realm, that requires authentication.)


错误(Errors)

1
struct URLError

由URL加载API返回的错误码。

URL加载系统错误信息key(URL Loading System Error Info Keys)

从URL加载API生成的错误对象的用户信息字典中识别这些key。


遗留包袱(Legacy)1

URL加载系统遗留包袱(Legacy URL Loading Systems)

将你的代码从这些坑中迁移走。(Migrate your code away from using these legacy objects.)


参见


网络(Networking)

URL加载系统(URL Loading System)

使用标准Internet协议与URL进行交互及与服务端通信。

Bonjour

本地网络上容易发现的广告服务,或者发现其他人的广告服务。
Advertise services for easy discovery on local networks, or discover services advertised by others.


  1. 我这里按照经验翻译成了平时我们常用的“包袱”这个词,这里就是指一些本应废弃的但是一段时间内很难迁移走的代码,也就是俗称的”坑”。。。如果有更好的翻译方式可以告诉我。