Contents

init(response:data:)

Creates a cached URL response instance.

Declaration

init(response: URLResponse, data: Data)

Parameters

  • response:

    The response to cache.

  • data:

    The data to cache.

Return Value

A cached URL response object, containing the response and data.

Discussion

The cache storage policy is set to the default, URLCache.StoragePolicy.allowed, and the user info dictionary is set to nil.

See Also

Creating a cached URL response