Handler

public class Handler<T>

A common interface for handlers that handles HTTP responses.

  • Creates a new instance with a callback block.

    Declaration

    Swift

    public init(_ callback: @escaping Callback<T>)
  • Handles the incoming data. A subclass should override the method.

    Declaration

    Swift

    public func handle(_: Data?, _: URLResponse?, _: Error?)