Open ClassFoundationNetworking5.9.0
URLSessionTask
A cancelable object that refers to the lifetime of processing a given request.
class URLSessionTask
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 NSCopying
The
NSCopying
protocol declares a method for providing functional copies of an object. The exact meaning of “copy” can vary from class to class, but a copy must be a functionally independent object with values identical to the original at the time the copy was made.protocol NSObjectProtocol
The
NSObjectProtocol
groups methods that are fundamental to all Foundation objects.protocol ProgressReporting
If your class supports reporting progress, then you can adopt the ProgressReporting protocol.
Members
init(
) static let defaultPriority: Float
The default URL session task priority, used implicitly for any task you have not prioritized. The floating point value of this constant is 0.5.
static let highPriority: Float
A high URL session task priority, with a floating point value above the default value and below the maximum of 1.0.
static let lowPriority: Float
A low URL session task priority, with a floating point value above the minimum of 0 and below the default value.
var countOfBytesClientExpectsToReceive: Int64
var countOfBytesClientExpectsToSend: Int64
var countOfBytesExpectedToReceive: Int64
Number of bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. */
var countOfBytesExpectedToSend: Int64
Number of body bytes we expect to send, derived from the Content-Length of the HTTP request */
var countOfBytesReceived: Int64
Number of body bytes already received
var countOfBytesSent: Int64
Number of body bytes already sent */
var currentRequest: URLRequest?
var error: Error?
var originalRequest: URLRequest?
var priority: Float
The priority of the task.
var progress: Progress
var response: URLResponse?
var state: URLSessionTask.State
var taskDescription: String?
The taskDescription property is available for the developer to provide a descriptive label for the task.
var taskIdentifier: Int
An identifier for this task, assigned by and unique to the owning session
func cancel(
) func copy(
) -> Any func copy(with: NSZone?
) -> Any func resume(
) Resume the task.
func suspend(
) Suspend the task.
enum State
var earliestBeginDate: Date?