OMCFetchFileBuilder Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | OMCFetchFileBuilder.h |
– getSyncPolicy
- Gets currently set SyncPolicy
- (OMCSyncPolicy *)getSyncPolicyReturn Value
OMCSyncPolicy object, if not set will return default SyncPolicy.
Declared In
OMCFetchFileBuilder.h
– setSyncPolicy:
- Sets SyncPolicy
- (void)setSyncPolicy:(OMCSyncPolicy *)syncPolicyParameters
syncPolicy |
will set the passed policy as current SyncPolicy |
|---|
Declared In
OMCFetchFileBuilder.h
– setSyncPolicyFetchFromServer
Sets Fetch policy in SyncPolicy as FETCH_POLICY_FETCH_FROM_SERVICE_IF_ONLINE, other policies in SyncPolicy will remain same.
- (void)setSyncPolicyFetchFromServerDeclared In
OMCFetchFileBuilder.h
– setRequestHeaders:
Sets extra request headers. No need of Headers for authorization or content-type. They will be added by default.
- (void)setRequestHeaders:(NSDictionary *)headersParameters
headers |
Extra request headers |
|---|
Declared In
OMCFetchFileBuilder.h
– executeFetchOnSuccess:OnError:
- Execute the Get request. Based on the set policy, it will go to the server, to the local cache, or to both.
- (void)executeFetchOnSuccess:(OMCFetchFileSuccess _Nullable)successBlk OnError:(OMCSyncErrorBlock _Nullable)errorBlkParameters
successBlk |
block that will be called after the request has successfully finished with the mobile resource. |
|---|---|
errorBlk |
block that will be called after the request has finished with an error. |
Declared In
OMCFetchFileBuilder.h