Posts

Showing posts with the label request

How to set a priority of retrofit requests

How to set a priority of retrofit requests I have ViewPager and in this ViewPager there are 4 fragments. Sorry but I can't to add a code, because that would be very big. Each of my fragments on create does asynchronous retrofit request to server. I have access_token and refresh_token too. So when my access_token expires I need to do a call using refresh_token to update my access_token . So when I launch my application it opens viewPager with my 4 fragments doing asynchronous requests. That means 4 requests at a time. And when my access_token is expired and I'm launching my app, all the fragments try to update the access token using refresh token. Turns out that one fragment updates the access_token (after the update refresh_token changes) other fragments try to update the token too, but I'm getting 401 because 1 fragment already updated the token and other fragments try to update the access_token using old refresh token. ViewPager access_token refresh_token access_tok...

Is there a way to get two values from a response of Binance API?

Is there a way to get two values from a response of Binance API? I am using the Binance API to get some cryptocurrency values. For example: *If I go to https://api.binance.com/api/v3/ticker/price I will get all the cryptocurrencies (Symbols and prices) *If I go to https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT I will only get the BTCUSDT values Is there a way to get 2 or N specific coins? Nope. – Matt Clark Jul 2 at 3:41 By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.