Skip to content
This repository has been archived by the owner on Aug 13, 2018. It is now read-only.

自动缓存(GET与POST请求用法相同) 对此有疑问? #42

Open
shang1219178163 opened this issue Aug 9, 2017 · 0 comments
Open

Comments

@shang1219178163
Copy link

shang1219178163 commented Aug 9, 2017

自动缓存(GET与POST请求用法相同)
[PPNetworkHelper GET:url parameters:nil responseCache:^(id responseCache) {

对此有疑问:

post调用的是 AFHTTPSessionManager的方法

responseCache!=nil ? responseCache([PPNetworkCache httpCacheForURL:URL parameters:parameters]) : nil;

NSURLSessionTask *sessionTask = [_sessionManager GET:URL parameters:parameters progress:^(NSProgress * _Nonnull uploadProgress) {

但GET调用的是 AFHTTPSessionManager的方法

responseCache!=nil ? responseCache([PPNetworkCache httpCacheForURL:URL parameters:parameters]) : nil;

NSURLSessionTask *sessionTask = [_sessionManager GET:URL parameters:parameters progress:^(NSProgress * _Nonnull uploadProgress)

虽然第一步缓存方式是一样的, responseCache!=nil ? responseCache([PPNetworkCache httpCacheForURL:URL parameters:parameters]) : nil;
但是后边调用AFHTTPSessionManager里的get和post是不一致的 ,对此post请求和get请求调用此方法不会出错吗?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant