react-http-fetch
Version:
An http library for React JS built on top of native JS fetch
14 lines (13 loc) • 621 B
JavaScript
import { HttpCacheService, HttpInMemoryCacheStore } from '../../cache';
import { HttpCacheStorePrefixDecorator } from '../../cache/prefix-decorator';
var HttpCacheFixture = /** @class */ (function () {
function HttpCacheFixture() {
}
HttpCacheFixture.create = function (store) {
var fallenbackStore = store || new HttpCacheStorePrefixDecorator(new HttpInMemoryCacheStore());
return new HttpCacheService(fallenbackStore);
};
HttpCacheFixture.defaultStore = new HttpCacheStorePrefixDecorator(new HttpInMemoryCacheStore());
return HttpCacheFixture;
}());
export { HttpCacheFixture };