-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRGNetworking.h
More file actions
40 lines (31 loc) · 1.31 KB
/
RGNetworking.h
File metadata and controls
40 lines (31 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// RGNetworking.h
//
// Created by Rok Gregorič on 18. 03. 13.
// Copyright (c) 2013 Rok Gregorič. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface RGNetworking : NSObject
+ (void)asyncRequestForUrl:(NSString *)url withCompletion:(void (^)(NSData *response, NSInteger code))completion;
+ (void)asyncGetRequestForUrl:(NSString *)url
withParams:(NSDictionary *)params
headers:(NSDictionary *)headers
completion:(void (^)(NSData *response, NSInteger code))completion;
+ (void)asyncPostRequestForUrl:(NSString *)url
withData:(NSData *)data
headers:(NSDictionary *)headers
completion:(void (^)(NSData *response, NSInteger code))completion;
+ (void)asyncPostRequestForUrl:(NSString *)url
withParams:(NSDictionary *)params
headers:(NSDictionary *)headers
completion:(void (^)(NSData *response, NSInteger code))completion;
+ (void)asyncPutRequestForUrl:(NSString *)url
withParams:(NSDictionary *)params
headers:(NSDictionary *)headers
data:(NSData *)data
completion:(void (^)(NSData *response, NSInteger code))completion;
+ (void)asyncDeleteRequestForUrl:(NSString *)url
withParams:(NSDictionary *)params
headers:(NSDictionary *)headers
completion:(void (^)(NSData *response, NSInteger code))completion;
@end