CombineWrapper
public final class CombineWrapper : WebcomWrapper, CustomDebugStringConvertible
The type that wraps DataSubscription
in order to enrich it with a Combine-based API.
See also the documentation section of WebcomWrapper
for the corresponding wrapped type.
To use this type, import the following dependency in your code:
import WebcomCombine
-
Declaration
Swift
public let wrapped: DataSubscription
-
Cancels this subscription.
It is also possible to cancel a subscription using the
DataNode.CombineWrapper.unsubscribeThroughNotifications(session:)
method or theDataNode.CombineWrapper.unsubscribeThroughWebhook(_:context:session:)
method, depending on the method used to subscribe. On the contrary, this method works in all cases, provided the returned subscription instance has been kept.Declaration
Swift
public func cancel(session: URLSession? = nil) -> WebcomFuture<Void>
Parameters
session
The session used to send the request to the back-end. When
nil
, the default session of the application of this instance is used.Return Value
A future with a void value.
-
cancel(session:
Asynchronous) Declaration
Swift
public func cancel(session: URLSession? = nil) async throws