Open
Conversation
requestId 类型改为 NSString,requestId 的值由 service 类名和taskIdentifier拼装而成
增加cancelAllRequests方法,用于取消所有未结束的请求
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
这个PR我把loadDataWithParams实例方法放到了CTAPIBaseManager头文件中,变成了公共方法
原因:
项目中新新开发的restAPI接口有些参数放到了method中,例如
`
return [NSString stringWithFormat:@"moarestapi/im/chat/%@/user/undisturbedstatus", self.conversationId];
}
`
需要在method中拼接一些参数,比如uid、conversationId之类的,这就导致这些API无法使用类方法的loadDataWithParams来发起请求,因为methodName方法是实例方法。只能通过实例方法loadData,通过代理回调的方式来处理响应,形成了一定的限制。所以我觉得可以开放loadDataWithParams实例方法,来方便使用。