Instance Method インスタンスメソッド

getCookiesFor(_:completionHandler:)

Fetches cookies relevant to the specified task and passes them to the completion handler. 指定されたタスクと関連があるクッキーをとってきます、そしてそれらを完了ハンドラに渡します。

Declaration 宣言

func getCookiesFor(_ task: URLSessionTask, 
 completionHandler: @escaping ([HTTPCookie]?) -> Void)

Parameters パラメータ

task

The task performing a request. The cookie storage can use the URL and other properties of this task’s request to determine which cookies to fetch. 要請を実行しているタスク。クッキーストレージは、このタスクの持つ要請のURLおよび他のプロパティを使って、どのクッキーをとってくるか決定することができます。

completionHandler

A completion handler that receives an array of cookies as its argument. クッキーの配列をそれの引数として受け取る完了ハンドラ。

Discussion 議論

See Also 参照

Retrieving Cookies クッキーの回収