-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added DZResponse class which is now the resolved value of all requests.
- The autocompletion snippet has also been updated to reflect the same.
- Loading branch information
1 parent
6fd96af
commit 86b3f43
Showing
10 changed files
with
142 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// DZResponse.h | ||
// DZNetworking | ||
// | ||
// Created by Nikhil Nigade on 7/28/15. | ||
// Copyright (c) 2015 Dezine Zync Studios LLP. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface DZResponse : NSObject | ||
|
||
@property (nonatomic, copy, readonly) id responseObject; | ||
@property (nonatomic, copy, readonly) NSHTTPURLResponse *response; | ||
@property (nonatomic, copy, readonly) NSURLSessionTask *task; | ||
|
||
- (instancetype)initWithData:(id)responseObject :(NSHTTPURLResponse *)response :(NSURLSessionTask *)task; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// DZResponse.m | ||
// DZNetworking | ||
// | ||
// Created by Nikhil Nigade on 7/28/15. | ||
// Copyright (c) 2015 Dezine Zync Studios LLP. All rights reserved. | ||
// | ||
|
||
#import "DZResponse.h" | ||
|
||
@implementation DZResponse | ||
|
||
- (instancetype)initWithData:(id)responseObject :(NSHTTPURLResponse *)response :(NSURLSessionTask *)task | ||
{ | ||
|
||
if(self = [super init]) | ||
{ | ||
_responseObject = responseObject; | ||
_response = response; | ||
_task = task; | ||
} | ||
|
||
return self; | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.