Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开放loadDataWithParams实例方法 #35

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Vincentzzg
Copy link

这个PR我把loadDataWithParams实例方法放到了CTAPIBaseManager头文件中,变成了公共方法

原因:
项目中新新开发的restAPI接口有些参数放到了method中,例如
`

  • (NSString *)methodName {
    return [NSString stringWithFormat:@"moarestapi/im/chat/%@/user/undisturbedstatus", self.conversationId];
    }

`
需要在method中拼接一些参数,比如uid、conversationId之类的,这就导致这些API无法使用类方法的loadDataWithParams来发起请求,因为methodName方法是实例方法。只能通过实例方法loadData,通过代理回调的方式来处理响应,形成了一定的限制。所以我觉得可以开放loadDataWithParams实例方法,来方便使用。

zhouzhongguang and others added 8 commits July 29, 2020 11:18
requestId 类型改为 NSString,requestId 的值由 service 类名和taskIdentifier拼装而成
增加cancelAllRequests方法,用于取消所有未结束的请求
修复类型不对进行相等性比较导致的崩溃
CTAPIBaseManager中requestIdList的写访问加锁
pthread_rwlock_t 锁,在dealloc方法中增加销毁的代码
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant