You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document provides a reference to the offline-persistence-toolkit's JavaScript API. Links to JSDoc for each class can be found to the right.
6
+
7
+
The toolkit's [README](https://github.com/oracle/offline-persistence-toolkit/"README") file provides an overview of the toolkit’s capabilities. Having read that document, you can find more information about how to implement a range of common and advanced use cases with the toolkit in the
<tdclass="description last">Options<ul><li>options.jsonProcessor An object containing the JSON shredder, unshredder, and queryHandler for the responses.</li><li>options.jsonProcessor.shredder JSON shredder for the responses</li><li>options.jsonProcessor.unshredder JSON unshredder for the responses</li><li>options.queryHandler query parameter handler. Should be a function which takes a Request and returns a Promise which resolves with a Response when the query parameters have been processed. If the Request was not handled then resolve to null.</li><li>options.fetchStrategy Should be a function which takes a Request and returns a Promise which resolves to a Response If unspecified then uses the default.</li><li>options.cacheStrategy Should be a function which returns a Promise which resolves with a response when the cache expiration behavior has been processed. If unspecified then uses the default which uses the HTTP cache headers to determine cache expiry.</li><li>options.requestHandlerOverride An object containing request handler overrides.</li><li>options.requestHandlerOverride.handleGet Override the default GET request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handlePost Override the default POST request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handlePut Override the default PUT request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handlePatch Override the default PATCH request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handleDelete Override the default DELETE request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handleHead Override the default HEAD request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handleOptions Override the default OPTIONS request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li></ul></td>
<tdclass="description last">Options<ul><li>options.jsonProcessor An object containing the JSON shredder, unshredder, and queryHandler for the responses.</li><li>options.jsonProcessor.shredder JSON shredder for the responses</li><li>options.jsonProcessor.unshredder JSON unshredder for the responses</li><li>options.queryHandler query parameter handler. Should be a function which takes a Request and returns a Promise which resolves with a Response when the query parameters have been processed. If the Request was not handled then resolve to null.</li><li>options.fetchStrategy Should be a function which takes a Request and returns a Promise which resolves to a Response If unspecified then uses the default.</li><li>options.cacheStrategy Should be a function which returns a Promise which resolves with a response when the cache expiration behavior has been processed. If unspecified then uses the default which uses the HTTP cache headers to determine cache expiry.</li><li>options.requestHandlerOverride An object containing request handler overrides.</li><li>options.requestHandlerOverride.handleGet Override the default GET request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handlePost Override the default POST request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handlePut Override the default PUT request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handlePatch Override the default PATCH request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handleDelete Override the default DELETE request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handleHead Override the default HEAD request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li><li>options.requestHandlerOverride.handleOptions Override the default OPTIONS request handler with the supplied function.The function should take a Request object as parameter and return a Promise which resolves to a Response object.</li></ul></td>
0 commit comments