Skip to content

Commit 9930ce5

Browse files
committed
delete download
1 parent bc4cf49 commit 9930ce5

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

Sources/Helpers/HTTP/URLSession+HTTPRequest.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff 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
///

0 commit comments

Comments
 (0)