MKNetworkEngine Class Reference
| Inherits from | NSObject |
| Declared in | MKNetworkEngine.h MKNetworkEngine.m |
Tasks
-
– initWithHostName: -
– initWithHostName:customHeaderFields: -
– initWithHostName:apiPath:customHeaderFields: -
– initWithHostName:portNumber:apiPath:customHeaderFields: -
– operationWithPath: -
– operationWithPath:params: -
– operationWithPath:params:httpMethod: -
– operationWithPath:params:httpMethod:ssl: -
– operationWithURLString: -
– operationWithURLString:params: -
– operationWithURLString:params:httpMethod: -
– prepareHeaders: -
– imageAtURL:size:onCompletion: -
– imageAtURL:onCompletion: -
– imageAtURL:completionHandler:errorHandler: -
– imageAtURL:size:completionHandler:errorHandler: -
– enqueueOperation: -
– enqueueOperation:forceReload: -
+ cancelOperationsContainingURLString: -
+ cancelOperationsMatchingBlock: -
– cancelAllOperations -
readonlyHostNameproperty -
portNumberproperty -
wifiOnlyModeproperty -
apiPathproperty -
reachabilityChangedHandlerproperty -
– registerOperationSubclass: -
– cacheDirectoryName -
– cacheMemoryCost -
– useCache -
– emptyCache -
– isReachable -
shouldSendAcceptLanguageHeaderproperty
Properties
apiPath
Sets an api path if it is different from root URL @property apiPath
@property (copy, nonatomic) NSString *apiPathDeclared In
MKNetworkEngine.hportNumber
Port Number that should be used by URL creating factory methods @property portNumber
@property (assign, nonatomic) int portNumberDeclared In
MKNetworkEngine.hreachabilityChangedHandler
Handler that you implement to monitor reachability changes @property reachabilityChangedHandler
@property (copy, nonatomic) void ( ^ ) ( NetworkStatus ns ) reachabilityChangedHandlerDeclared In
MKNetworkEngine.hreadonlyHostName
HostName of the engine @property readonlyHostName
@property (readonly, copy, nonatomic) NSString *readonlyHostNameDeclared In
MKNetworkEngine.hClass Methods
Instance Methods
cacheDirectoryName
Cache Directory Name
- (NSString *)cacheDirectoryNameDeclared In
MKNetworkEngine.hcancelAllOperations
Cancels all operations created by this engine
- (void)cancelAllOperationsDeclared In
MKNetworkEngine.henqueueOperation:
Enqueues your operation into the shared queue
- (void)enqueueOperation:(MKNetworkOperation *)requestDeclared In
MKNetworkEngine.henqueueOperation:forceReload:
Enqueues your operation into the shared queue.
- (void)enqueueOperation:(MKNetworkOperation *)operation forceReload:(BOOL)forceReloadDeclared In
MKNetworkEngine.himageAtURL:completionHandler:errorHandler:
Handy helper method for fetching images in the background
- (MKNetworkOperation *)imageAtURL:(NSURL *)url completionHandler:(MKNKImageBlock)imageFetchedBlock errorHandler:(MKNKResponseErrorBlock)errorBlockDeclared In
MKNetworkEngine.himageAtURL:onCompletion:
Handy helper method for fetching images
- (MKNetworkOperation *)imageAtURL:(NSURL *)url onCompletion:(MKNKImageBlock)imageFetchedBlockDeclared In
MKNetworkEngine.himageAtURL:size:completionHandler:errorHandler:
Handy helper method for fetching images asynchronously in the background
- (MKNetworkOperation *)imageAtURL:(NSURL *)url size:(CGSize)size completionHandler:(MKNKImageBlock)imageFetchedBlock errorHandler:(MKNKResponseErrorBlock)errorBlockDeclared In
MKNetworkEngine.himageAtURL:size:onCompletion:
Handy helper method for fetching images asynchronously in the background
- (MKNetworkOperation *)imageAtURL:(NSURL *)url size:(CGSize)size onCompletion:(MKNKImageBlock)imageFetchedBlockDeclared In
MKNetworkEngine.hinitWithHostName:
Initializes your network engine with a hostname
- (id)initWithHostName:(NSString *)hostNameDeclared In
MKNetworkEngine.hinitWithHostName:apiPath:customHeaderFields:
Initializes your network engine with a hostname
- (id)initWithHostName:(NSString *)hostName apiPath:(NSString *)apiPath customHeaderFields:(NSDictionary *)headersDeclared In
MKNetworkEngine.hinitWithHostName:customHeaderFields:
Initializes your network engine with a hostname and custom header fields
- (id)initWithHostName:(NSString *)hostName customHeaderFields:(NSDictionary *)headersDeclared In
MKNetworkEngine.hinitWithHostName: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 *)headersDeclared In
MKNetworkEngine.hoperationWithPath:
Creates a simple GET Operation with a request URL
- (MKNetworkOperation *)operationWithPath:(NSString *)pathDeclared In
MKNetworkEngine.hoperationWithPath:params:
Creates a simple GET Operation with a request URL and parameters
- (MKNetworkOperation *)operationWithPath:(NSString *)path params:(NSDictionary *)bodyDeclared In
MKNetworkEngine.hoperationWithPath:params:httpMethod:
Creates a simple GET Operation with a request URL, parameters and HTTP Method
- (MKNetworkOperation *)operationWithPath:(NSString *)path params:(NSDictionary *)body httpMethod:(NSString *)methodDeclared In
MKNetworkEngine.hoperationWithPath:params:httpMethod:ssl:
Creates a simple GET Operation with a request URL, parameters, HTTP Method and the SSL switch
- (MKNetworkOperation *)operationWithPath:(NSString *)path params:(NSDictionary *)body httpMethod:(NSString *)method ssl:(BOOL)useSSLDeclared In
MKNetworkEngine.hoperationWithURLString:
Creates a simple GET Operation with a request URL
- (MKNetworkOperation *)operationWithURLString:(NSString *)urlStringDeclared In
MKNetworkEngine.hoperationWithURLString:params:
Creates a simple GET Operation with a request URL and parameters
- (MKNetworkOperation *)operationWithURLString:(NSString *)urlString params:(NSDictionary *)bodyDeclared In
MKNetworkEngine.hoperationWithURLString:params:httpMethod:
Creates a simple Operation with a request URL, parameters and HTTP Method
- (MKNetworkOperation *)operationWithURLString:(NSString *)urlString params:(NSDictionary *)body httpMethod:(NSString *)methodDeclared In
MKNetworkEngine.hprepareHeaders:
adds the custom default headers
- (void)prepareHeaders:(MKNetworkOperation *)operationDeclared In
MKNetworkEngine.h