TuSDKNetworkEngine Class Reference
Inherits from | NSObject |
---|---|
Declared in | TuSDKNetworkEngine.h |
– initWithHostName:
Initializes your network engine with a hostname
- (id)initWithHostName:(NSString *)hostName
Declared In
TuSDKNetworkEngine.h
– initWithHostName:customHeaderFields:
Initializes your network engine with a hostname and custom header fields
- (id)initWithHostName:(NSString *)hostName customHeaderFields:(NSDictionary *)headers
Declared In
TuSDKNetworkEngine.h
– initWithHostName:apiPath:customHeaderFields:
Initializes your network engine with a hostname
- (id)initWithHostName:(NSString *)hostName apiPath:(NSString *)apiPath customHeaderFields:(NSDictionary *)headers
Declared In
TuSDKNetworkEngine.h
– initWithHostName:portNumber:apiPath:customHeaderFields:
Initializes your network engine with a hostname, port, path, and headers.
- (id)initWithHostName:(NSString *)hostName portNumber:(int)portNumber apiPath:(NSString *)apiPath customHeaderFields:(NSDictionary *)headers
Declared In
TuSDKNetworkEngine.h
– operationWithPath:
Creates a simple GET Operation with a request URL
- (TuSDKNetworkOperation *)operationWithPath:(NSString *)path
Declared In
TuSDKNetworkEngine.h
– operationWithPath:params:
Creates a simple GET Operation with a request URL and parameters
- (TuSDKNetworkOperation *)operationWithPath:(NSString *)path params:(NSDictionary *)body
Declared In
TuSDKNetworkEngine.h
– operationWithPath:params:httpMethod:
Creates a simple GET Operation with a request URL, parameters and HTTP Method
- (TuSDKNetworkOperation *)operationWithPath:(NSString *)path params:(NSDictionary *)body httpMethod:(NSString *)method
Declared In
TuSDKNetworkEngine.h
– operationWithPath:params:httpMethod:ssl:
Creates a simple GET Operation with a request URL, parameters, HTTP Method and the SSL switch
- (TuSDKNetworkOperation *)operationWithPath:(NSString *)path params:(NSDictionary *)body httpMethod:(NSString *)method ssl:(BOOL)useSSL
Declared In
TuSDKNetworkEngine.h
– operationWithURLString:
Creates a simple GET Operation with a request URL
- (TuSDKNetworkOperation *)operationWithURLString:(NSString *)urlString
Declared In
TuSDKNetworkEngine.h
– operationWithURLString:params:
Creates a simple GET Operation with a request URL and parameters
- (TuSDKNetworkOperation *)operationWithURLString:(NSString *)urlString params:(NSDictionary *)body
Declared In
TuSDKNetworkEngine.h
– operationWithURLString:params:httpMethod:
Creates a simple Operation with a request URL, parameters and HTTP Method
- (TuSDKNetworkOperation *)operationWithURLString:(NSString *)urlString params:(NSDictionary *)body httpMethod:(NSString *)method
Declared In
TuSDKNetworkEngine.h
– prepareHeaders:
adds the custom default headers
- (void)prepareHeaders:(TuSDKNetworkOperation *)operation
Declared In
TuSDKNetworkEngine.h
– imageAtURL:completionHandler:errorHandler:
Handy helper method for fetching images in the background
- (TuSDKNetworkOperation *)imageAtURL:(NSURL *)url completionHandler:(LSQNKImageBlock)imageFetchedBlock errorHandler:(LSQNKResponseErrorBlock)errorBlock
Declared In
TuSDKNetworkEngine.h
– imageAtURL:size:completionHandler:errorHandler:
Handy helper method for fetching images asynchronously in the background
- (TuSDKNetworkOperation *)imageAtURL:(NSURL *)url size:(CGSize)size completionHandler:(LSQNKImageBlock)imageFetchedBlock errorHandler:(LSQNKResponseErrorBlock)errorBlock
Declared In
TuSDKNetworkEngine.h
– enqueueOperation:
Enqueues your operation into the shared queue
- (void)enqueueOperation:(TuSDKNetworkOperation *)request
Declared In
TuSDKNetworkEngine.h
– enqueueOperation:forceReload:
Enqueues your operation into the shared queue.
- (void)enqueueOperation:(TuSDKNetworkOperation *)operation forceReload:(BOOL)forceReload
Declared In
TuSDKNetworkEngine.h
+ cancelOperationsContainingURLString:
Cancels operations matching a given string
+ (void)cancelOperationsContainingURLString:(NSString *)string
Declared In
TuSDKNetworkEngine.h
+ cancelOperationsMatchingBlock:
Cancels operations matching the given block.
+ (void)cancelOperationsMatchingBlock:(BOOL ( ^ ) ( TuSDKNetworkOperation *))block
Declared In
TuSDKNetworkEngine.h
– cancelAllOperations
Cancels all operations created by this engine
- (void)cancelAllOperations
Declared In
TuSDKNetworkEngine.h
readonlyHostName
HostName of the engine @property readonlyHostName
@property (readonly, copy, nonatomic) NSString *readonlyHostName
Declared In
TuSDKNetworkEngine.h
portNumber
Port Number that should be used by URL creating factory methods @property portNumber
@property (assign, nonatomic) int portNumber
Declared In
TuSDKNetworkEngine.h
wifiOnlyMode
WiFi only mode @property wifiOnlyMode
@property (assign, nonatomic) BOOL wifiOnlyMode
Declared In
TuSDKNetworkEngine.h
apiPath
Sets an api path if it is different from root URL @property apiPath
@property (copy, nonatomic) NSString *apiPath
Declared In
TuSDKNetworkEngine.h
reachabilityChangedHandler
Handler that you implement to monitor reachability changes @property reachabilityChangedHandler
@property (copy, nonatomic) void ( ^ ) ( TuSDKNetworkStatus ns ) reachabilityChangedHandler
Declared In
TuSDKNetworkEngine.h
– registerOperationSubclass:
Registers an associated operation subclass
- (void)registerOperationSubclass:(Class)aClass
Declared In
TuSDKNetworkEngine.h
– cacheDirectoryName
Cache Directory Name
- (NSString *)cacheDirectoryName
Declared In
TuSDKNetworkEngine.h
– cacheMemoryCost
Cache Directory In Memory Cost
- (NSUInteger)cacheMemoryCost
Declared In
TuSDKNetworkEngine.h
shouldSendAcceptLanguageHeader
Boolean variable that states whether the request should automatically include an Accept-Language header. @property shouldSendAcceptLanguageHeader
@property (nonatomic, assign) BOOL shouldSendAcceptLanguageHeader
Declared In
TuSDKNetworkEngine.h
– putCustomHeaderWithKey:value:
put Custom Header
- (void)putCustomHeaderWithKey:(NSString *)key value:(NSString *)value
Parameters
key |
key |
---|---|
value |
value |
Declared In
TuSDKNetworkEngine.h