refresh static method

void refresh(
  1. String id,
  2. String refresh,
  3. String type,
  4. Function callback,
)

Implementation

static void refresh(String id, String refresh, String type, Function callback) {
    post("/refresh/$type", "{\"id\": \"$id\", \"refresh\": \"$refresh\"}", (Http.Response response) {
        // get token response
        TokenResponse tokenResponse = TokenResponse.fromJson(response.body);
        authorise(tokenResponse.access);
        callback(response);
    });
}