Age | Commit message (Collapse) | Author |
|
|
|
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
|
|
|
|
Added ErrorResponse and ErrorCallback. Each Request now has an
ErrorCallback, which should be called instead of usual callback in case
of failure.
|
|
|
|
It now just extends CurlJsonRequest, not wraps one.
|
|
ConnectionManager now storages Request * (not generates ids for it),
Requests have control on their RequestState, RequestIdPair is now called
Response and storages Request * with some response together.
All related classes are changed to use it in more clean and
understandable way.
Request, RequestState and Response are carefully commented/documented.
|
|
Well, it takes two API calls instead of one now, but there are no
problems with expired token because of it.
This commit changes Storage::streamFile() to pass NetworkReadStream *
through callback.
|
|
OneDriveTokenRefresher is a CurlJsonRequest replacement for
OneDriveStorage methods. It behaves very similarly, but checks received
JSON before passing it to user. If it contains "error" key, it attempts
to refresh the token through OneDriveStorage, and then restarts the
original request, so user won't notice that there ever was an error.
|