-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJSONService.h
More file actions
22 lines (17 loc) · 763 Bytes
/
JSONService.h
File metadata and controls
22 lines (17 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#import <Foundation/Foundation.h>
#import "DataService.h"
@interface JSONService : DataService
+ (JSONService*)service;
-(void)requestWithURL:(NSURL*)url
method:(NSString*)method
headers:(NSDictionary*)headers
jsonString:(NSString*)body
receiveHandler:(void (^)(id response, NSNumber *status, NSDictionary *headers))receiveHandler
errorHandler:(void (^)(NSError *error))errorHandler;
-(void)requestWithURL:(NSURL*)url
method:(NSString*)method
headers:(NSDictionary*)headers
jsonData:(id)body
receiveHandler:(void (^)(id response, NSNumber *status, NSDictionary *headers))receiveHandler
errorHandler:(void (^)(NSError *error))errorHandler;
@end