Skip to content

Instantly share code, notes, and snippets.

View Aximem's full-sized avatar

Maxime Charruel Aximem

  • Montpellier, France
View GitHub Profile
@Aximem
Aximem / DegradedMode.swift
Last active April 28, 2021 17:10
Classe to manage safely requests / Store them if it generates an error and send back when connexion came back or when user choose
//
// DegradedMode.swift
//
// Created by Maxime Charruel on 25/07/2017.
// Copyright © 2017 Maxime Charruel. All rights reserved.
//
// DegradedMode allow you to sent safely requests and prevent error cases (e.g. timeout, connexion
// issues, ...).
// When a request failed, it is stored in UserDefault and send back it when user choose to or
// automatically when connexion come back