MMNetworkClientProtocol Protocol Reference
| Conforms to | NSObject |
| Declared in | MMNetworkClientProtocol.h |
Overview
Provides an intermediate layer (service layer) to
decouple the mechanism to retrieve information from
a server from the intent to retrieve information from
the server. This allows for mocking or allows you to
swap out the object that actually performs a service
call. i.e. Swap out
NSURLConnectionwith the AFNetworklibrary for example.
Instance Methods
performNetworkRequest:completionHandler:
- Represents the intent to retrieve data from
- (void)performNetworkRequest:(NSMutableURLRequest *)request completionHandler:(NetworkResponseBlock)completionBlockDiscussion
- a server.
*
@param request The request object.
@param completionBlock The callback block that is
to be called when network callreturns.
Declared In
MMNetworkClientProtocol.h