SPURLConnection Class Reference
Inherits from | NSObject |
Conforms to | NSURLConnectionDelegate |
Declared in | SPURLConnection.h |
Overview
A wrapper over NSURLConnection that simplifies its usage by routing the result into a simple block.
Tasks
Initialization
-
– initWithRequest:
Initializes a connection for a certain request. The request is NOT started automatically.
Methods
-
– startWithBlock:
Starts the request asynchronously. The callback block will be executed from the calling thread.
-
– cancel
Cancels an asynchronous load of a request.
Instance Methods
cancel
Cancels an asynchronous load of a request.
- (void)cancel
Discussion
Cancels an asynchronous load of a request.
Declared In
SPURLConnection.h
initWithRequest:
Initializes a connection for a certain request. The request is NOT started automatically.
- (instancetype)initWithRequest:(NSURLRequest *)request
Discussion
Initializes a connection for a certain request. The request is NOT started automatically.
Declared In
SPURLConnection.h
startWithBlock:
Starts the request asynchronously. The callback block will be executed from the calling thread.
- (void)startWithBlock:(SPURLConnectionCompleteBlock)completeBlock
Discussion
Starts the request asynchronously. The callback block will be executed from the calling thread.
Declared In
SPURLConnection.h