Is there a concept of minimum time interval between successive requests to same endpoint in Moya?
What is the use case? I feel like this is a responsibility of the client.
Suppose in viewwillAppear(), we fetch data from endpoint. User can return to viewcontroller by pressing a tab button (say). If I keep hitting tab button then I keep hitting the endpoint with mostly no new data arriving.
That does feel like a client side thing.
Sent with GitHawk
Moya (Alamofire) is felicitating the API requests here right? So either Moya or Alamofire should have this feature?
@sandeepbol Yeah I'm a little confused as to whether the behavior you want here is something like tracking in flights or throttling requests, but this feature is out of scope for Moya, in my opinion. It's too client specific
Thanks @BasThomas @SD10 for your replies. Its definitely not throttling that I am looking for. Now if I make a request over and over (I mean if a user decides to press a particular button just hoping to see some change in data like tap-tap-tap-tap-...), we will be downloading the same data over and over without much change, thus making device do a lot of unnecessary fetching. I talked about a very extreme scenario but navigating back and forth between screens will fetch same data on return. So I was wondering if it should be in Moya but you guys seem to be in consensus that it is client specific and I will accept it :)
Many thanks again (y)
Most helpful comment
Thanks @BasThomas @SD10 for your replies. Its definitely not throttling that I am looking for. Now if I make a request over and over (I mean if a user decides to press a particular button just hoping to see some change in data like tap-tap-tap-tap-...), we will be downloading the same data over and over without much change, thus making device do a lot of unnecessary fetching. I talked about a very extreme scenario but navigating back and forth between screens will fetch same data on return. So I was wondering if it should be in Moya but you guys seem to be in consensus that it is client specific and I will accept it :)
Many thanks again (y)