-
Notifications
You must be signed in to change notification settings - Fork 0
/
TBXML+HTTP.h
executable file
·35 lines (20 loc) · 960 Bytes
/
TBXML+HTTP.h
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
//
// TBXML+HTTP.h
//
// Created by Tom Bradley on 29/01/2011.
// Copyright 2012 71Squared All rights reserved.
//
#import "TBXML.h"
typedef void (^TBXMLAsyncRequestSuccessBlock)(NSData *,NSURLResponse *);
typedef void (^TBXMLAsyncRequestFailureBlock)(NSData *,NSError *);
@interface NSMutableURLRequest (TBXML_HTTP)
+ (NSMutableURLRequest*) tbxmlGetRequestWithURL:(NSURL*)url;
+ (NSMutableURLRequest*) tbxmlPostRequestWithURL:(NSURL*)url parameters:(NSDictionary*)parameters;
@end
@interface NSURLConnection (TBXML_HTTP)
+ (void)tbxmlAsyncRequest:(NSURLRequest *)request success:(TBXMLAsyncRequestSuccessBlock)successBlock failure:(TBXMLAsyncRequestFailureBlock)failureBlock;
@end
@interface TBXML (TBXML_HTTP)
+ (id)tbxmlWithURL:(NSURL*)aURL success:(TBXMLSuccessBlock)successBlock failure:(TBXMLFailureBlock)failureBlock;
- (id)initWithURL:(NSURL*)aURL success:(TBXMLSuccessBlock)successBlock failure:(TBXMLFailureBlock)failureBlock;
@end