forked from sonofsky2010/TQT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
QAsyncHttp.m
34 lines (23 loc) · 1.05 KB
/
QAsyncHttp.m
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
//
// QAsyncHttp.m
// QWeiboSDK4iOS
//
// Created on 11-1-18.
//
//
#import "QAsyncHttp.h"
#import "QMutableURLRequest.h"
@implementation QAsyncHttp
- (NSURLConnection *)httpGet:(NSString *)aUrl queryString:(NSString *)aQueryString delegate:(id)aDelegare {
NSMutableURLRequest *request = [QMutableURLRequest requestGet:aUrl queryString:aQueryString];
return [NSURLConnection connectionWithRequest:request delegate:aDelegare];
}
- (NSURLConnection *)httpPost:(NSString *)aUrl queryString:(NSString *)aQueryString delegate:(id)aDelegare {
NSMutableURLRequest *request = [QMutableURLRequest requestPost:aUrl queryString:aQueryString];
return [NSURLConnection connectionWithRequest:request delegate:aDelegare];
}
- (NSURLConnection *)httpPostWithFile:(NSDictionary *)files url:(NSString *)aUrl queryString:(NSString *)aQueryString delegate:(id)aDelegare {
NSMutableURLRequest *request = [QMutableURLRequest requestPostWithFile:files url:aUrl queryString:aQueryString];
return [NSURLConnection connectionWithRequest:request delegate:aDelegare];
}
@end