iPhone ASIHTTP - Distinguishing between API calls?

后端 未结 4 1425
故里飘歌
故里飘歌 2021-02-06 14:07

I currently have a view controller that implements ASIHTTP for handling API calls.

My view controller fires 2 separate calls. I need to be able to distinguish between t

4条回答
  •  时光说笑
    2021-02-06 14:41

    You can set the appropriate selectors which should be called at request creation:

    [request setDelegate: self];
    [request setDidFailSelector: @selector(apiCallDidFail:)];
    [request setDidFinishSelector: @selector(apiCallDidFinish:)];
    

    Just set different selectors for different calls

提交回复
热议问题