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 {
75
75
return ( data, response)
76
76
}
77
77
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
-
97
78
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || (compiler(>=6) && os(visionOS))
98
79
/// Returns a byte stream that conforms to AsyncSequence protocol.
99
80
///
You can’t perform that action at this time.
0 commit comments