AFNetworking - do not cache response

前端 未结 8 1543
说谎
说谎 2020-12-08 16:51

I\'m using this code to pull a simple JSON feed from a server:

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.         


        
8条回答
  •  孤城傲影
    2020-12-08 17:35

    try to add some rubbish at the end of your URL (for example, timestamp)

    kDataUrl = [NSString stringWithFormat:@"%@?%f", kDataUrl, [NSDate timeIntervalSinceReferenceDate]];
    

    In this case, you would request fresh data every time. That works for me))

提交回复
热议问题