File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -75,25 +75,6 @@ extension URLSession {
7575 return ( data, response)
7676 }
7777
78- /// Convenience method to download using an `HTTPRequest`; creates and resumes a `URLSessionDownloadTask` internally.
79- ///
80- /// - Parameter request: The `HTTPRequest` for which to download.
81- /// - Parameter delegate: Task-specific delegate.
82- /// - Returns: Downloaded file URL and response. The file will not be removed automatically.
83- public func download(
84- for request: HTTPRequest ,
85- delegate: ( any URLSessionTaskDelegate ) ? = nil
86- ) async throws -> ( URL , HTTPResponse ) {
87- guard let urlRequest = URLRequest ( httpRequest: request) else {
88- throw HTTPTypeConversionError . failedToConvertHTTPRequestToURLRequest
89- }
90- let ( location, urlResponse) = try await self . download ( for: urlRequest, delegate: delegate)
91- guard let response = ( urlResponse as? HTTPURLResponse ) ? . httpResponse else {
92- throw HTTPTypeConversionError . failedToConvertURLResponseToHTTPResponse
93- }
94- return ( location, response)
95- }
96-
9778 #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || (compiler(>=6) && os(visionOS))
9879 /// Returns a byte stream that conforms to AsyncSequence protocol.
9980 ///
You can’t perform that action at this time.
0 commit comments