Contents

storeCookies(_:for:)

Stores an array of cookies in the cookie storage, on behalf of the provided task, if the cookie accept policy permits.

Declaration

func storeCookies(_ cookies: [HTTPCookie], for task: URLSessionTask)

Parameters

  • cookies:

    The cookies to add.

  • task:

    The task that handles the response. Override this method and inspect this parameter if you need to alter your cookie storage strategy based on properties of the task.

See Also

Adding and removing cookies