SMPublicRequestService Class Reference
Inherits from | NSObject |
---|---|
Declared in | SMPublicRequestService.h |
+ getInstance
Static singleton instance method
+ (id)getInstance
Return Value
\link RestManager \endlink
Discussion
Static singleton instance method
Declared In
SMPublicRequestService.h
– fetch:withMethodType:withRequestInfo:completionHandler:
Sent REST request to server Create a request with
- (void)fetch:(NSString *_Nonnull)resourceURL withMethodType:(SMRestPublicMethodTypes)methodType withRequestInfo:(NSDictionary *_Nullable)requestInfo completionHandler:(void ( ^ _Nonnull ) ( NSDictionary *_Nullable fetchResponse , SMMobileError *_Nullable error ))completionBlock
Parameters
resourceURL |
endpoint of REST Request. This endpoint will generate a suitable suffix then add into REST request. Cannot be nullable. |
---|---|
methodType |
methodType which will use to send REST request. SMRestPublicMethodTypes supports POST, GET, PUT and DELETE method types for REST request. Cannot be nullable. |
requestInfo |
request body in the REST request. RequestInfo can be required for any method type. |
completion |
Request completion block will return response body and error if any. |
Discussion
Sent REST request to server Create a request with
Declared In
SMPublicRequestService.h