Open Classswift 5.10.0FoundationNetworking
URLSession
class URLSession
Superclasses
class NSObject
The root class of most Foundation class hierarchies.
Citizens in FoundationNetworking
Conformances
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
Types
Type members
init(configuration: URLSessionConfiguration
) init(configuration: URLSessionConfiguration, delegate: (any URLSessionDelegate)?, delegateQueue: OperationQueue?
)
Instance members
var configuration: URLSessionConfiguration
var delegate: (any URLSessionDelegate)?
var delegateQueue: OperationQueue
var sessionDescription: String?
func dataTask(with: URL
) -> URLSessionDataTask func dataTask(with: URLRequest
) -> URLSessionDataTask func dataTask(with: URL, completionHandler: @escaping (Data?, URLResponse?, (any Error)?) -> Void
) -> URLSessionDataTask func dataTask(with: URLRequest, completionHandler: @escaping (Data?, URLResponse?, (any Error)?) -> Void
) -> URLSessionDataTask func downloadTask(with: URL
) -> URLSessionDownloadTask func downloadTask(with: URLRequest
) -> URLSessionDownloadTask func downloadTask(with: URL, completionHandler: @escaping (URL?, URLResponse?, (any Error)?) -> Void
) -> URLSessionDownloadTask func downloadTask(with: URLRequest, completionHandler: @escaping (URL?, URLResponse?, (any Error)?) -> Void
) -> URLSessionDownloadTask func downloadTask(withResumeData: Data
) -> URLSessionDownloadTask func downloadTask(withResumeData: Data, completionHandler: @escaping (URL?, URLResponse?, (any Error)?) -> Void
) -> URLSessionDownloadTask func finishTasksAndInvalidate(
) func flush(completionHandler: @escaping () -> Void
) func getAllTasks(completionHandler: @escaping ([URLSessionTask]) -> Void
) func getTasksWithCompletionHandler(@escaping ([URLSessionDataTask], [URLSessionUploadTask], [URLSessionDownloadTask]) -> Void
) func invalidateAndCancel(
) func reset(completionHandler: @escaping () -> Void
) func uploadTask(with: URLRequest, from: Data
) -> URLSessionUploadTask func uploadTask(with: URLRequest, from: Data?, completionHandler: @escaping (Data?, URLResponse?, (any Error)?) -> Void
) -> URLSessionUploadTask func uploadTask(with: URLRequest, fromFile: URL
) -> URLSessionUploadTask func uploadTask(with: URLRequest, fromFile: URL, completionHandler: @escaping (Data?, URLResponse?, (any Error)?) -> Void
) -> URLSessionUploadTask func uploadTask(withStreamedRequest: URLRequest
) -> URLSessionUploadTask func webSocketTask(with: URL
) -> URLSessionWebSocketTask func webSocketTask(with: URLRequest
) -> URLSessionWebSocketTask func webSocketTask(with: URL, protocols: [String]
) -> URLSessionWebSocketTask