This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Compatibility with AFNetworking 3 and HTTP/2 #22
Open
abbasmousavi
wants to merge
8
commits into
AFNetworking:master
Choose a base branch
from
abbasmousavi:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a04344e
Using AFHTTPSessionManager instead of AFHTTPRequestOperation
abbasmousavi 3a03890
Changing deployment_target in podspec from 6.0 to 7.0
abbasmousavi e53bfe7
Changing Mac deployment_target in podspec from 10.8 to 10.9
abbasmousavi 973e007
Updating dependendy to AFNetworking
abbasmousavi 7f671f5
Using modular import
abbasmousavi e330fd2
Adds watchOS support
abbasmousavi 3ce4aab
adding tvOS support
abbasmousavi da8ae50
Changing AFNetworking dependacy to ‘~> 3.0’
abbasmousavi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,14 +21,14 @@ | |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#import "AFHTTPRequestOperationManager.h" | ||
#import "AFHTTPSessionManager.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably just import AFNetworkings framework header. #import <AFNetworking/AFNetworking.h> |
||
|
||
/** | ||
AFJSONRPCClient objects communicate with web services using the JSON-RPC 2.0 protocol. | ||
|
||
@see http://www.jsonrpc.org/specification | ||
*/ | ||
@interface AFJSONRPCClient : AFHTTPRequestOperationManager | ||
@interface AFJSONRPCClient : AFHTTPSessionManager | ||
|
||
/** | ||
The endpoint URL for the webservice. | ||
|
@@ -74,8 +74,8 @@ | |
@param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred. | ||
*/ | ||
- (void)invokeMethod:(NSString *)method | ||
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success | ||
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; | ||
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
|
||
/** | ||
Creates a request with the specified method and parameters, and enqueues a request operation for it. | ||
|
@@ -87,8 +87,8 @@ | |
*/ | ||
- (void)invokeMethod:(NSString *)method | ||
withParameters:(id)parameters | ||
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success | ||
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; | ||
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
|
||
/** | ||
Creates a request with the specified method and parameters, and enqueues a request operation for it. | ||
|
@@ -102,8 +102,8 @@ | |
- (void)invokeMethod:(NSString *)method | ||
withParameters:(id)parameters | ||
requestId:(id)requestId | ||
success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success | ||
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; | ||
success:(void (^)(NSURLSessionDataTask *task, id responseObject))success | ||
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure; | ||
|
||
///---------------------- | ||
/// @name Method Proxying | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to lock to
~> 3.0
or perhaps a range of> 2.1
,< 4.0
if AFNetworking 2 should still be supported. Otherwise any breaking changes in AFNetworking 4.0 would break AFJSONRPCClient.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code only works with AFNetworking 3.0, It is better to lock it to ~> 3.0.
We can create a branch with current code for AFNetworking 2.0 if anyone uses it.
I have changed it in a new commit.
@kylef