TTRequestScheduler

Objective-C

@interface TTRequestScheduler : NSObject

Swift

class TTRequestScheduler : NSObject

A TTRequestScheduler object is used to schedule and perform requests on a background thread.

  • Creates a TTResult object with the given server url.

    Declaration

    Objective-C

    - (instancetype _Nonnull)initWithURL:(NSString *_Nonnull)url;

    Swift

    init(url: String)

    Parameters

    url

    The server url.

    Return Value

    TTRequestScheduler object.

  • Cancels all scheduled Requests.

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()
  • Schedules a given Request to be performed on a background thread.

    Declaration

    Objective-C

    - (void)scheduleRequest:(TTRequest *_Nonnull)request;

    Swift

    func scheduleRequest(_ request: TTRequest<AnyObject>)

    Parameters

    request

    The Request to be scheduled.