Contents

data(from:)

Convenience method to load data using a URL, creates and resumes a URLSessionDataTask internally.

Declaration

func data(from url: URL) async throws -> (Data, URLResponse)

Parameters

  • url:

    The URL for which to load data.

Return Value

Data and response.

See Also

Performing asynchronous transfers