Contents

getCookies(for:completionHandler:)

Declaration

func getCookies(for url: URL, completionHandler: @escaping @MainActor @Sendable ([HTTPCookie]) -> Void)
func getCookies(for url: URL) async -> [HTTPCookie]

Parameters

  • url:

    The URL to fetch the matching cookies for.

  • completionHandler:

    A block to invoke with the fetched cookies.

Discussion

Fetches stored cookies that match the passed in URL.