Inherits from NSObject
Declared in EBRequest.h
EBRequest.m

Overview

Represents an abstract request

Tasks

  •   sourceURL

    Source URL

    property
  •   completionBlock

    Completion block called when the request is finished correctly. The completion block is always executed in the main thread.

    property
  •   errorBlock

    Error block called when the request fails. The error block is always executed in the main thread.

    property
  •   runLoopMode

    Optional property. When set, this run loop mode will be assigned to the internal NSURLConnection.

    property
  •   isRunning

    Specifies whether the current request is running.

    property
  •   delegate

    Delegate. See EBRequestDelegate

    property
  • + requestWithURL:

    Creates a new request with the specified URL. Not started until start is called.

  • – initWithURL:

    Creates a new request with the specified URL. Not started until start is called.

  • – start

    Starts an asynchronous request

  • – stop

    Stops an asynchronous request.

Properties

completionBlock

Completion block called when the request is finished correctly. The completion block is always executed in the main thread.

@property (atomic, copy) EBCompletionBlock completionBlock

Discussion

Completion block called when the request is finished correctly. The completion block is always executed in the main thread.

Declared In

EBRequest.h

delegate

Delegate. See EBRequestDelegate

@property (nonatomic, assign) id<EBRequestDelegate> delegate

Discussion

Delegate. See EBRequestDelegate

Declared In

EBRequest.h

errorBlock

Error block called when the request fails. The error block is always executed in the main thread.

@property (atomic, copy) EBErrorBlock errorBlock

Discussion

Error block called when the request fails. The error block is always executed in the main thread.

Declared In

EBRequest.h

isRunning

Specifies whether the current request is running.

@property (nonatomic, readonly) BOOL isRunning

Discussion

Specifies whether the current request is running.

Declared In

EBRequest.h

runLoopMode

Optional property. When set, this run loop mode will be assigned to the internal NSURLConnection.

@property (nonatomic, retain) NSString *runLoopMode

Discussion

Optional property. When set, this run loop mode will be assigned to the internal NSURLConnection.

Declared In

EBRequest.h

sourceURL

Source URL

@property (atomic, retain) NSURL *sourceURL

Discussion

Source URL

Declared In

EBRequest.h

Class Methods

requestWithURL:

Creates a new request with the specified URL. Not started until start is called.

+ (id)requestWithURL:(NSURL *)url

Parameters

url

URL for the request

Discussion

Creates a new request with the specified URL. Not started until start is called.

Declared In

EBRequest.h

Instance Methods

initWithURL:

Creates a new request with the specified URL. Not started until start is called.

- (id)initWithURL:(NSURL *)url

Parameters

url

URL for the request.

Discussion

Creates a new request with the specified URL. Not started until start is called.

Declared In

EBRequest.h

start

Starts an asynchronous request

- (BOOL)start

Return Value

YES if the request could be started. NO otherwise.

Discussion

Starts an asynchronous request

Declared In

EBRequest.h

stop

Stops an asynchronous request.

- (void)stop

Discussion

Stops an asynchronous request.

Declared In

EBRequest.h