Closed marleynoleto closed 3 years ago
Hi @marleynoleto this is just an hypothetical case if you are using the http library to request your API. In this example you could look for status codes to control the update of the App remotely.
We use DIO and the Interceptors functionality to monitor all http requests and look for the http status code.
You can use any logic to trigger this module. Please let me know if you need a complete example and I can add one to the examples folder.
Hi @marleynoleto @Sakib0604 , I will work on that and add a complete example with Dio.
Would also be interested in your example with Dio. Thanks!
Hi @marleynoleto @sebastianbuechler @Sakib0604
I hope this simple example in dede4df will help you. Let me know if you guys any question.
I've simply followed https://pub.dev/packages/dio#handling-errors guide.
Best,
Hi, in example you describe that I need to get http status code by a requisition. You would send us a example? Or send to us a link thet document this process?
/// For example: You got status code of 412 from the /// response of HTTP request. /// Let's say the statusCode 412 requires you to force update int statusCode = 412;
thanks