@@ -35,20 +35,19 @@ - (void)tearDown {
3535- (void )testPost {
3636 __block QNResponseInfo *testInfo = nil ;
3737 NSData *data = [@" Hello, World!" dataUsingEncoding: NSUTF8StringEncoding];
38- [_httpManager post: @" http://www.baidu.com" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
38+ [_httpManager post: @" http://www.baidu.com" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
3939 testInfo = info;
40- }
41- withProgressBlock: nil
42- withCancelBlock: nil
43- withAccess: nil ];
40+ } withProgressBlock: nil
41+ withCancelBlock: nil
42+ withAccess: nil ];
4443
4544 AGWW_WAIT_WHILE (testInfo == nil , 100.0 );
4645 NSLog (@" %@ " , testInfo);
4746
4847 XCTAssert (testInfo.reqId == nil , @" Pass" );
4948
5049 testInfo = nil ;
51- [_httpManager post: @" http://up.qiniu.com" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
50+ [_httpManager post: @" http://up.qiniu.com" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
5251 testInfo = info;
5352 }
5453 withProgressBlock: nil
@@ -60,7 +59,7 @@ - (void)testPost {
6059 XCTAssert (testInfo.reqId , @" Pass" );
6160
6261 testInfo = nil ;
63- [_httpManager post: @" http://httpbin.org/status/500" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
62+ [_httpManager post: @" http://httpbin.org/status/500" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
6463 testInfo = info;
6564 }
6665 withProgressBlock: nil
@@ -73,7 +72,7 @@ - (void)testPost {
7372 XCTAssert (testInfo.error != nil , @" Pass" );
7473
7574 testInfo = nil ;
76- [_httpManager post: @" http://httpbin.org/status/418" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
75+ [_httpManager post: @" http://httpbin.org/status/418" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
7776 testInfo = info;
7877 }
7978 withProgressBlock: nil
@@ -86,7 +85,7 @@ - (void)testPost {
8685 XCTAssert (testInfo.error != nil , @" Pass" );
8786
8887 testInfo = nil ;
89- [_httpManager post: @" http://httpbin.org/status/200" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
88+ [_httpManager post: @" http://httpbin.org/status/200" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
9089
9190 testInfo = info;
9291 }
@@ -111,7 +110,7 @@ - (void)testProxy {
111110 QNSessionManager *httpManager = [[QNSessionManager alloc ] initWithProxy: proxyDict timeout: 60 urlConverter: nil ];
112111 NSData *data = [@" Hello, World!" dataUsingEncoding: NSUTF8StringEncoding];
113112 __block QNResponseInfo *testInfo = nil ;
114- [httpManager post: @" http://up123.qiniu.com" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
113+ [httpManager post: @" http://up123.qiniu.com" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
115114 testInfo = info;
116115 }
117116 withProgressBlock: nil
@@ -131,7 +130,7 @@ - (void)testUrlConvert {
131130 QNSessionManager *httpManager = [[QNSessionManager alloc ] initWithProxy: nil timeout: 60 urlConverter: c];
132131 NSData *data = [@" Hello, World!" dataUsingEncoding: NSUTF8StringEncoding];
133132 __block QNResponseInfo *testInfo = nil ;
134- [httpManager post: @" http://upnono.qiniu.com" withData: data withParams: nil withHeaders: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
133+ [httpManager post: @" http://upnono.qiniu.com" withData: data withParams: nil withHeaders: nil withTaskIdentifier: nil withCompleteBlock: ^(QNResponseInfo *info, NSDictionary *resp) {
135134 testInfo = info;
136135 }
137136 withProgressBlock: nil
0 commit comments