Yamila Gammeri
09/21/2020, 10:47 AMnetworkService.fuelManager.request(BTXInteractApi.GetLegal()).awaitObjectResult<LegalModel>(kotlinxDeserializerOf(json = networkService.json()))
, I was wondering how I could check the HTTP status code and then decode the response into another model based on this.
2. The API I’m using requires the use of an access token + refresh token, is it possible to configure fuel such that I can intercept a failed auth request and then update the session using the access token? E.g. a request is made, server responds with 401, another request is made to refresh session, original request is sent again, response is received