Skip to content

Commit c67ebff

Browse files
committed
expose selector JSONFromURLWithString:method:params:orBodyString:completion:
1 parent dbda177 commit c67ebff

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎JSONModel/JSONModelNetworking/JSONHTTPClient.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ typedef void (^JSONObjectBlock)(NSDictionary* json, JSONModelError* err);
121121
*/
122122
+(void)getJSONFromURLWithString:(NSString*)urlString params:(NSDictionary*)params completion:(JSONObjectBlock)completeBlock;
123123

124+
/**
125+
* Makes a request to the given URL address and fetches a JSON response.
126+
* @param urlString the URL as a string
127+
* @param method the method of the request as a string
128+
* @param params a dictionary of key / value pairs to be send as variables to the request
129+
* @param bodyString the body of the POST request as a string
130+
* @param completeBlock JSONObjectBlock to execute upon completion
131+
*/
132+
+(void)JSONFromURLWithString:(NSString*)urlString method:(NSString*)method params:(NSDictionary*)params orBodyString:(NSString*)bodyString completion:(JSONObjectBlock)completeBlock;
133+
124134
/////////////////////////////////////////////////////////////////////////////////////////////
125135
#pragma mark - POST synchronious JSON calls
126136

0 commit comments

Comments
 (0)