WireClient Interface
This file exposes a get/put/delete interface on top of XMLHttpRequest. It requires to be configured with parameters about the remotestorage server to connect to. Each instance of WireClient is always associated with a single remotestorage server and access token.
Usually the WireClient instance can be accessed via `remoteStorage.remote`.
In addition to this, the WireClient has some compatibility features to work with remotestorage 2012.04 compatible storages. For example it will cache revisions from folder listings in-memory and return them accordingly as the “revision” parameter in response to #get() requests. Similarly it will return 404 when it receives an empty folder listing, to mimic remotestorage-01 behavior. Note that it is not always possible to know the revision beforehand, hence it may be undefined at times (especially for caching-roots).
RemoteStorage. | WireClient Interface |
Events | |
change | never fired for some reason |
connected | fired when the wireclient connect method realizes that it is in posession of a token and a href |
Properties | |
token | Holds the bearer token of this WireClient, as obtained in the OAuth dance |
href | Holds the server’s base URL, as obtained in the Webfinger discovery |
storageApi | Holds the spec version the server claims to be compatible with |