Socket
Socket
Sign inDemoInstall

angular-in-memory-web-api

Package Overview
Dependencies
7
Maintainers
2
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.4 to 0.6.0

http-backend.service.ngfactory.js.map

3

backend.service.d.ts

@@ -1,3 +0,2 @@

import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Observable, BehaviorSubject } from 'rxjs';
import { HeadersCore, RequestInfoUtilities, InMemoryDbService, InMemoryBackendConfigArgs, ParsedRequestUrl, PassThruBackend, RequestCore, RequestInfo, ResponseOptions, UriInfo } from './interfaces';

@@ -4,0 +3,0 @@ /**

@@ -1,8 +0,3 @@

import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { of } from 'rxjs/observable/of';
import { fromPromise } from 'rxjs/observable/fromPromise';
import { isPromise } from 'rxjs/util/isPromise';
import { concatMap } from 'rxjs/operator/concatMap';
import { first } from 'rxjs/operator/first';
import { Observable, BehaviorSubject, of, from } from 'rxjs';
import { concatMap, first } from 'rxjs/operators';
import { getStatusText, isSuccess, STATUS } from './http-status-codes';

@@ -18,3 +13,10 @@ import { delayResponse } from './delay-response';

*/
var BackendService = (function () {
var /**
* Base class for in-memory web api back-ends
* Simulate the behavior of a RESTy web api
* backed by the simple in-memory data store provided by the injected `InMemoryDbService` service.
* Conforms mostly to behavior described here:
* http://www.restapitutorial.com/lessons/httpmethods.html
*/
BackendService = /** @class */ (function () {
function BackendService(inMemDbService, config) {

@@ -38,3 +40,3 @@ if (config === void 0) { config = {}; }

}
return first.call(this.dbReadySubject.asObservable(), function (r) { return r; });
return this.dbReadySubject.asObservable().pipe(first(function (r) { return r; }));
},

@@ -68,6 +70,54 @@ enumerable: true,

*/
BackendService.prototype.handleRequest = function (req) {
/**
* Process Request and return an Observable of Http Response object
* in the manner of a RESTy web api.
*
* Expect URI pattern in the form :base/:collectionName/:id?
* Examples:
* // for store with a 'customers' collection
* GET api/customers // all customers
* GET api/customers/42 // the character with id=42
* GET api/customers?name=^j // 'j' is a regex; returns customers whose name starts with 'j' or 'J'
* GET api/customers.json/42 // ignores the ".json"
*
* Also accepts direct commands to the service in which the last segment of the apiBase is the word "commands"
* Examples:
* POST commands/resetDb,
* GET/POST commands/config - get or (re)set the config
*
* HTTP overrides:
* If the injected inMemDbService defines an HTTP method (lowercase)
* The request is forwarded to that method as in
* `inMemDbService.get(requestInfo)`
* which must return either an Observable of the response type
* for this http library or null|undefined (which means "keep processing").
*/
BackendService.prototype.handleRequest = /**
* Process Request and return an Observable of Http Response object
* in the manner of a RESTy web api.
*
* Expect URI pattern in the form :base/:collectionName/:id?
* Examples:
* // for store with a 'customers' collection
* GET api/customers // all customers
* GET api/customers/42 // the character with id=42
* GET api/customers?name=^j // 'j' is a regex; returns customers whose name starts with 'j' or 'J'
* GET api/customers.json/42 // ignores the ".json"
*
* Also accepts direct commands to the service in which the last segment of the apiBase is the word "commands"
* Examples:
* POST commands/resetDb,
* GET/POST commands/config - get or (re)set the config
*
* HTTP overrides:
* If the injected inMemDbService defines an HTTP method (lowercase)
* The request is forwarded to that method as in
* `inMemDbService.get(requestInfo)`
* which must return either an Observable of the response type
* for this http library or null|undefined (which means "keep processing").
*/
function (req) {
var _this = this;
// handle the request when there is an in-memory database
return concatMap.call(this.dbReady, function () { return _this.handleRequest_(req); });
return this.dbReady.pipe(concatMap(function () { return _this.handleRequest_(req); }));
};

@@ -127,3 +177,9 @@ BackendService.prototype.handleRequest_ = function (req) {

*/
BackendService.prototype.addDelay = function (response) {
/**
* Add configured delay to response observable unless delay === 0
*/
BackendService.prototype.addDelay = /**
* Add configured delay to response observable unless delay === 0
*/
function (response) {
var d = this.config.delay;

@@ -137,3 +193,13 @@ return d === 0 ? response : delayResponse(response, d || 500);

*/
BackendService.prototype.applyQuery = function (collection, query) {
/**
* Apply query/search parameters as a filter over the collection
* This impl only supports RegExp queries on string properties of the collection
* ANDs the conditions together
*/
BackendService.prototype.applyQuery = /**
* Apply query/search parameters as a filter over the collection
* This impl only supports RegExp queries on string properties of the collection
* ANDs the conditions together
*/
function (collection, query) {
// extract filtering conditions - {propertyName, RegExps) - from query/search parameters

@@ -164,3 +230,9 @@ var conditions = [];

*/
BackendService.prototype.bind = function (methodName) {
/**
* Get a method from the `InMemoryDbService` (if it exists), bound to that service
*/
BackendService.prototype.bind = /**
* Get a method from the `InMemoryDbService` (if it exists), bound to that service
*/
function (methodName) {
var fn = this.inMemDbService[methodName];

@@ -216,3 +288,37 @@ return fn ? fn.bind(this.inMemDbService) : undefined;

*/
BackendService.prototype.commands = function (reqInfo) {
/**
* Commands reconfigure the in-memory web api service or extract information from it.
* Commands ignore the latency delay and respond ASAP.
*
* When the last segment of the `apiBase` path is "commands",
* the `collectionName` is the command.
*
* Example URLs:
* commands/resetdb (POST) // Reset the "database" to its original state
* commands/config (GET) // Return this service's config object
* commands/config (POST) // Update the config (e.g. the delay)
*
* Usage:
* http.post('commands/resetdb', undefined);
* http.get('commands/config');
* http.post('commands/config', '{"delay":1000}');
*/
BackendService.prototype.commands = /**
* Commands reconfigure the in-memory web api service or extract information from it.
* Commands ignore the latency delay and respond ASAP.
*
* When the last segment of the `apiBase` path is "commands",
* the `collectionName` is the command.
*
* Example URLs:
* commands/resetdb (POST) // Reset the "database" to its original state
* commands/config (GET) // Return this service's config object
* commands/config (POST) // Update the config (e.g. the delay)
*
* Usage:
* http.post('commands/resetdb', undefined);
* http.get('commands/config');
* http.post('commands/config', '{"delay":1000}');
*/
function (reqInfo) {
var _this = this;

@@ -227,3 +333,3 @@ var command = reqInfo.collectionName.toLowerCase();

resOptions.status = STATUS.NO_CONTENT;
return concatMap.call(this.resetDb(reqInfo), function () { return _this.createResponse$(function () { return resOptions; }, false /* no latency delay */); });
return this.resetDb(reqInfo).pipe(concatMap(function () { return _this.createResponse$(function () { return resOptions; }, false /* no latency delay */); }));
case 'config':

@@ -260,3 +366,13 @@ if (method === 'get') {

*/
BackendService.prototype.createResponse$ = function (resOptionsFactory, withDelay) {
/**
* Create a cold response Observable from a factory for ResponseOptions
* @param resOptionsFactory - creates ResponseOptions when observable is subscribed
* @param withDelay - if true (default), add simulated latency delay from configuration
*/
BackendService.prototype.createResponse$ = /**
* Create a cold response Observable from a factory for ResponseOptions
* @param resOptionsFactory - creates ResponseOptions when observable is subscribed
* @param withDelay - if true (default), add simulated latency delay from configuration
*/
function (resOptionsFactory, withDelay) {
if (withDelay === void 0) { withDelay = true; }

@@ -271,3 +387,11 @@ var resOptions$ = this.createResponseOptions$(resOptionsFactory);

*/
BackendService.prototype.createResponseOptions$ = function (resOptionsFactory) {
/**
* Create a cold Observable of ResponseOptions.
* @param resOptionsFactory - creates ResponseOptions when observable is subscribed
*/
BackendService.prototype.createResponseOptions$ = /**
* Create a cold Observable of ResponseOptions.
* @param resOptionsFactory - creates ResponseOptions when observable is subscribed
*/
function (resOptionsFactory) {
var _this = this;

@@ -287,3 +411,5 @@ return new Observable(function (responseObserver) {

}
catch (e) { }
catch (e) {
/* ignore failure */
}
if (isSuccess(status)) {

@@ -316,3 +442,13 @@ responseObserver.next(resOptions);

*/
BackendService.prototype.findById = function (collection, id) {
/**
* Find first instance of item in collection by `item.id`
* @param collection
* @param id
*/
BackendService.prototype.findById = /**
* Find first instance of item in collection by `item.id`
* @param collection
* @param id
*/
function (collection, id) {
return collection.find(function (item) { return item.id === id; });

@@ -326,3 +462,15 @@ };

*/
BackendService.prototype.genId = function (collection, collectionName) {
/**
* Generate the next available id for item in this collection
* Use method from `inMemDbService` if it exists and returns a value,
* else delegates to `genIdDefault`.
* @param collection - collection of items with `id` key property
*/
BackendService.prototype.genId = /**
* Generate the next available id for item in this collection
* Use method from `inMemDbService` if it exists and returns a value,
* else delegates to `genIdDefault`.
* @param collection - collection of items with `id` key property
*/
function (collection, collectionName) {
var genId = this.bind('genId');

@@ -344,3 +492,15 @@ if (genId) {

*/
BackendService.prototype.genIdDefault = function (collection, collectionName) {
/**
* Default generator of the next available id for item in this collection
* This default implementation works only for numeric ids.
* @param collection - collection of items with `id` key property
* @param collectionName - name of the collection
*/
BackendService.prototype.genIdDefault = /**
* Default generator of the next available id for item in this collection
* This default implementation works only for numeric ids.
* @param collection - collection of items with `id` key property
* @param collectionName - name of the collection
*/
function (collection, collectionName) {
if (!this.isCollectionIdNumeric(collection, collectionName)) {

@@ -377,3 +537,9 @@ throw new Error("Collection '" + collectionName + "' id type is non-numeric or unknown. Can only generate numeric ids.");

*/
BackendService.prototype.getLocation = function (url) {
/**
* Get location info from a url, even on server where `document` is not defined
*/
BackendService.prototype.getLocation = /**
* Get location info from a url, even on server where `document` is not defined
*/
function (url) {
if (!url.startsWith('http')) {

@@ -393,3 +559,11 @@ // get the document iff running in browser

*/
BackendService.prototype.getPassThruBackend = function () {
/**
* get or create the function that passes unhandled requests
* through to the "real" backend.
*/
BackendService.prototype.getPassThruBackend = /**
* get or create the function that passes unhandled requests
* through to the "real" backend.
*/
function () {
return this.passThruBackend ?

@@ -403,3 +577,11 @@ this.passThruBackend :

*/
BackendService.prototype.getRequestInfoUtils = function () {
/**
* Get utility methods from this service instance.
* Useful within an HTTP method override
*/
BackendService.prototype.getRequestInfoUtils = /**
* Get utility methods from this service instance.
* Useful within an HTTP method override
*/
function () {
var _this = this;

@@ -422,3 +604,5 @@ return {

/** Parse the id as a number. Return original value if not a number. */
BackendService.prototype.parseId = function (collection, collectionName, id) {
/** Parse the id as a number. Return original value if not a number. */
BackendService.prototype.parseId = /** Parse the id as a number. Return original value if not a number. */
function (collection, collectionName, id) {
if (!this.isCollectionIdNumeric(collection, collectionName)) {

@@ -436,3 +620,11 @@ // Can't confirm that `id` is a numeric type; don't parse as a number

* */
BackendService.prototype.isCollectionIdNumeric = function (collection, collectionName) {
/**
* return true if can determine that the collection's `item.id` is a number
* This implementation can't tell if the collection is empty so it assumes NO
* */
BackendService.prototype.isCollectionIdNumeric = /**
* return true if can determine that the collection's `item.id` is a number
* This implementation can't tell if the collection is empty so it assumes NO
* */
function (collection, collectionName) {
// collectionName not used now but override might maintain collection type information

@@ -459,3 +651,37 @@ // so that it could know the type of the `id` even when the collection is empty.

*/
BackendService.prototype.parseRequestUrl = function (url) {
/**
* Parses the request URL into a `ParsedRequestUrl` object.
* Parsing depends upon certain values of `config`: `apiBase`, `host`, and `urlRoot`.
*
* Configuring the `apiBase` yields the most interesting changes to `parseRequestUrl` behavior:
* When apiBase=undefined and url='http://localhost/api/collection/42'
* {base: 'api/', collectionName: 'collection', id: '42', ...}
* When apiBase='some/api/root/' and url='http://localhost/some/api/root/collection'
* {base: 'some/api/root/', collectionName: 'collection', id: undefined, ...}
* When apiBase='/' and url='http://localhost/collection'
* {base: '/', collectionName: 'collection', id: undefined, ...}
*
* The actual api base segment values are ignored. Only the number of segments matters.
* The following api base strings are considered identical: 'a/b' ~ 'some/api/' ~ `two/segments'
*
* To replace this default method, assign your alternative to your InMemDbService['parseRequestUrl']
*/
BackendService.prototype.parseRequestUrl = /**
* Parses the request URL into a `ParsedRequestUrl` object.
* Parsing depends upon certain values of `config`: `apiBase`, `host`, and `urlRoot`.
*
* Configuring the `apiBase` yields the most interesting changes to `parseRequestUrl` behavior:
* When apiBase=undefined and url='http://localhost/api/collection/42'
* {base: 'api/', collectionName: 'collection', id: '42', ...}
* When apiBase='some/api/root/' and url='http://localhost/some/api/root/collection'
* {base: 'some/api/root/', collectionName: 'collection', id: undefined, ...}
* When apiBase='/' and url='http://localhost/collection'
* {base: '/', collectionName: 'collection', id: undefined, ...}
*
* The actual api base segment values are ignored. Only the number of segments matters.
* The following api base strings are considered identical: 'a/b' ~ 'some/api/' ~ `two/segments'
*
* To replace this default method, assign your alternative to your InMemDbService['parseRequestUrl']
*/
function (url) {
try {

@@ -508,3 +734,8 @@ var loc = this.getLocation(url);

// Can update an existing entity too if post409 is false.
BackendService.prototype.post = function (_a) {
// Create entity
// Can update an existing entity too if post409 is false.
BackendService.prototype.post =
// Create entity
// Can update an existing entity too if post409 is false.
function (_a) {
var collection = _a.collection, collectionName = _a.collectionName, headers = _a.headers, id = _a.id, req = _a.req, resourceUrl = _a.resourceUrl, url = _a.url;

@@ -547,3 +778,3 @@ var item = this.clone(this.getJsonBody(req));

return this.config.post204 ?
{ headers: headers, status: STATUS.NO_CONTENT } :
{ headers: headers, status: STATUS.NO_CONTENT } : // successful; no content
{ headers: headers, body: body, status: STATUS.OK }; // successful; return entity

@@ -554,3 +785,8 @@ }

// Can create an entity too if put404 is false.
BackendService.prototype.put = function (_a) {
// Update existing entity
// Can create an entity too if put404 is false.
BackendService.prototype.put =
// Update existing entity
// Can create an entity too if put404 is false.
function (_a) {
var collection = _a.collection, collectionName = _a.collectionName, headers = _a.headers, id = _a.id, req = _a.req, url = _a.url;

@@ -573,3 +809,3 @@ var item = this.clone(this.getJsonBody(req));

return this.config.put204 ?
{ headers: headers, status: STATUS.NO_CONTENT } :
{ headers: headers, status: STATUS.NO_CONTENT } : // successful; no content
{ headers: headers, body: body, status: STATUS.OK }; // successful; return entity

@@ -599,3 +835,11 @@ }

*/
BackendService.prototype.resetDb = function (reqInfo) {
/**
* Tell your in-mem "database" to reset.
* returns Observable of the database because resetting it could be async
*/
BackendService.prototype.resetDb = /**
* Tell your in-mem "database" to reset.
* returns Observable of the database because resetting it could be async
*/
function (reqInfo) {
var _this = this;

@@ -605,5 +849,5 @@ this.dbReadySubject.next(false);

var db$ = db instanceof Observable ? db :
isPromise(db) ? fromPromise(db) :
typeof db.then === 'function' ? from(db) :
of(db);
first.call(db$).subscribe(function (d) {
db$.pipe(first()).subscribe(function (d) {
_this.db = d;

@@ -616,3 +860,10 @@ _this.dbReadySubject.next(true);

}());
/**
* Base class for in-memory web api back-ends
* Simulate the behavior of a RESTy web api
* backed by the simple in-memory data store provided by the injected `InMemoryDbService` service.
* Conforms mostly to behavior described here:
* http://www.restapitutorial.com/lessons/httpmethods.html
*/
export { BackendService };
//# sourceMappingURL=backend.service.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"BackendService":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs"}]}],"handleRequest":[{"__symbolic":"method"}],"handleRequest_":[{"__symbolic":"method"}],"addDelay":[{"__symbolic":"method"}],"applyQuery":[{"__symbolic":"method"}],"bind":[{"__symbolic":"method"}],"bodify":[{"__symbolic":"method"}],"clone":[{"__symbolic":"method"}],"collectionHandler":[{"__symbolic":"method"}],"commands":[{"__symbolic":"method"}],"createErrorResponseOptions":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createResponseOptions$":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"findById":[{"__symbolic":"method"}],"genId":[{"__symbolic":"method"}],"genIdDefault":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getLocation":[{"__symbolic":"method"}],"getPassThruBackend":[{"__symbolic":"method"}],"getRequestInfoUtils":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"indexOf":[{"__symbolic":"method"}],"parseId":[{"__symbolic":"method"}],"isCollectionIdNumeric":[{"__symbolic":"method"}],"parseRequestUrl":[{"__symbolic":"method"}],"post":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"removeById":[{"__symbolic":"method"}],"resetDb":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"BackendService":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs"}]}],"handleRequest":[{"__symbolic":"method"}],"handleRequest_":[{"__symbolic":"method"}],"addDelay":[{"__symbolic":"method"}],"applyQuery":[{"__symbolic":"method"}],"bind":[{"__symbolic":"method"}],"bodify":[{"__symbolic":"method"}],"clone":[{"__symbolic":"method"}],"collectionHandler":[{"__symbolic":"method"}],"commands":[{"__symbolic":"method"}],"createErrorResponseOptions":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createResponseOptions$":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"findById":[{"__symbolic":"method"}],"genId":[{"__symbolic":"method"}],"genIdDefault":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getLocation":[{"__symbolic":"method"}],"getPassThruBackend":[{"__symbolic":"method"}],"getRequestInfoUtils":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"indexOf":[{"__symbolic":"method"}],"parseId":[{"__symbolic":"method"}],"isCollectionIdNumeric":[{"__symbolic":"method"}],"parseRequestUrl":[{"__symbolic":"method"}],"post":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"removeById":[{"__symbolic":"method"}],"resetDb":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"BackendService":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":37,"character":30},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs","line":38,"character":12}]}],"handleRequest":[{"__symbolic":"method"}],"handleRequest_":[{"__symbolic":"method"}],"addDelay":[{"__symbolic":"method"}],"applyQuery":[{"__symbolic":"method"}],"bind":[{"__symbolic":"method"}],"bodify":[{"__symbolic":"method"}],"clone":[{"__symbolic":"method"}],"collectionHandler":[{"__symbolic":"method"}],"commands":[{"__symbolic":"method"}],"createErrorResponseOptions":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createResponseOptions$":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}],"findById":[{"__symbolic":"method"}],"genId":[{"__symbolic":"method"}],"genIdDefault":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getLocation":[{"__symbolic":"method"}],"getPassThruBackend":[{"__symbolic":"method"}],"getRequestInfoUtils":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"indexOf":[{"__symbolic":"method"}],"parseId":[{"__symbolic":"method"}],"isCollectionIdNumeric":[{"__symbolic":"method"}],"parseRequestUrl":[{"__symbolic":"method"}],"post":[{"__symbolic":"method"}],"put":[{"__symbolic":"method"}],"removeById":[{"__symbolic":"method"}],"resetDb":[{"__symbolic":"method"}]}}}}]

@@ -5,3 +5,4 @@ # "angular-in-memory-web-api" versions

>
>Most importantly, it is ***always experimental***.
>Most importantly, it is ***always experimental***.
We will make breaking changes and we won't feel bad about it

@@ -12,2 +13,13 @@ because this is a development tool, not a production product.

<a id="0.6.0"></a>
## 0.6.0 (2018-03-22)
*Migrate to Angular v6 and RxJS v6*
Note that this release is pinned to Angular "^6.0.0-rc.0" and RxJS "^6.0.0-beta.1".
Will likely update again when they are official.
**BREAKING CHANGE**
This version depends on RxJS v6 and is not backward compatible with earlier RxJS versions.
<a id="0.5.4"></a>

@@ -14,0 +26,0 @@ ## 0.5.4 (2018-03-09)

@@ -1,3 +0,3 @@

import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/** adds specified delay (in ms) to both next and error channels of the response observable */
export declare function delayResponse<T>(response$: Observable<T>, delayMs: number): Observable<T>;

@@ -1,2 +0,2 @@

import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
// Replaces use of RxJS delay. See v0.5.4.

@@ -3,0 +3,0 @@ /** adds specified delay (in ms) to both next and error channels of the response observable */

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"delayResponse":{"__symbolic":"function","parameters":["response$","delayMs"],"value":{"__symbolic":"error","message":"Function call not supported","line":5,"character":27}}}},{"__symbolic":"module","version":1,"metadata":{"delayResponse":{"__symbolic":"function","parameters":["response$","delayMs"],"value":{"__symbolic":"error","message":"Function call not supported","line":5,"character":27}}}}]
[{"__symbolic":"module","version":4,"metadata":{"delayResponse":{"__symbolic":"function","parameters":["response$","delayMs"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"rxjs","name":"Observable","line":5,"character":13},"arguments":[{"__symbolic":"error","message":"Lambda not supported","line":5,"character":27}]}}}}]
import { Injector } from '@angular/core';
import { Connection, ConnectionBackend, Headers, Request, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { InMemoryBackendConfigArgs, InMemoryDbService, ResponseOptions } from './interfaces';

@@ -5,0 +5,0 @@ import { BackendService } from './backend.service';

@@ -13,3 +13,3 @@ var __extends = (this && this.__extends) || (function () {

import { BrowserXhr, Headers, ReadyState, RequestMethod, Response, ResponseOptions as HttpResponseOptions, URLSearchParams, XHRBackend, XSRFStrategy } from '@angular/http';
import { map } from 'rxjs/operator/map';
import { map } from 'rxjs/operators';
import { STATUS } from './http-status-codes';

@@ -45,3 +45,3 @@ import { InMemoryBackendConfig, InMemoryBackendConfigArgs, InMemoryDbService } from './interfaces';

*/
var HttpBackendService = (function (_super) {
var HttpBackendService = /** @class */ (function (_super) {
__extends(HttpBackendService, _super);

@@ -89,5 +89,5 @@ function HttpBackendService(injector, inMemDbService, config) {

HttpBackendService.prototype.createResponse$fromResponseOptions$ = function (resOptions$) {
return map.call(resOptions$, function (opts) {
return resOptions$.pipe(map(function (opts) {
return new Response(new HttpResponseOptions(opts));
});
}));
};

@@ -110,14 +110,14 @@ HttpBackendService.prototype.createPassThruBackend = function () {

};
HttpBackendService.decorators = [
{ type: Injectable },
];
/** @nocollapse */
HttpBackendService.ctorParameters = function () { return [
{ type: Injector, },
{ type: InMemoryDbService, },
{ type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig,] }, { type: Optional },] },
]; };
return HttpBackendService;
}(BackendService));
export { HttpBackendService };
HttpBackendService.decorators = [
{ type: Injectable },
];
/** @nocollapse */
HttpBackendService.ctorParameters = function () { return [
{ type: Injector, },
{ type: InMemoryDbService, },
{ type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig,] }, { type: Optional },] },
]; };
//# sourceMappingURL=http-backend.service.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"HttpBackendService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./backend.service","name":"BackendService"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs"}]}],"createConnection":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"HttpBackendService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./backend.service","name":"BackendService"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs"}]}],"createConnection":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"HttpBackendService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./backend.service","name":"BackendService","line":52,"character":40},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":51,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":57,"character":5},"arguments":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":57,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":57,"character":36}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":55,"character":22},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":56,"character":20},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs","line":57,"character":55}]}],"createConnection":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}]}}}}]
import { HttpBackend, HttpEvent, HttpHeaders, HttpRequest, HttpResponse, HttpXhrBackend, XhrFactory } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
import { InMemoryBackendConfigArgs, InMemoryDbService, ResponseOptions } from './interfaces';

@@ -4,0 +4,0 @@ import { BackendService } from './backend.service';

@@ -13,3 +13,3 @@ var __extends = (this && this.__extends) || (function () {

import { HttpHeaders, HttpParams, HttpResponse, HttpXhrBackend, XhrFactory } from '@angular/common/http';
import { map } from 'rxjs/operator/map';
import { map } from 'rxjs/operators';
import { STATUS } from './http-status-codes';

@@ -45,3 +45,3 @@ import { InMemoryBackendConfig, InMemoryBackendConfigArgs, InMemoryDbService } from './interfaces';

*/
var HttpClientBackendService = (function (_super) {
var HttpClientBackendService = /** @class */ (function (_super) {
__extends(HttpClientBackendService, _super);

@@ -82,3 +82,3 @@ function HttpClientBackendService(inMemDbService, config, xhrFactory) {

HttpClientBackendService.prototype.createResponse$fromResponseOptions$ = function (resOptions$) {
return map.call(resOptions$, function (opts) { return new HttpResponse(opts); });
return resOptions$.pipe(map(function (opts) { return new HttpResponse(opts); }));
};

@@ -94,14 +94,14 @@ HttpClientBackendService.prototype.createPassThruBackend = function () {

};
HttpClientBackendService.decorators = [
{ type: Injectable },
];
/** @nocollapse */
HttpClientBackendService.ctorParameters = function () { return [
{ type: InMemoryDbService, },
{ type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig,] }, { type: Optional },] },
{ type: XhrFactory, },
]; };
return HttpClientBackendService;
}(BackendService));
export { HttpClientBackendService };
HttpClientBackendService.decorators = [
{ type: Injectable },
];
/** @nocollapse */
HttpClientBackendService.ctorParameters = function () { return [
{ type: InMemoryDbService, },
{ type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig,] }, { type: Optional },] },
{ type: XhrFactory, },
]; };
//# sourceMappingURL=http-client-backend.service.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"HttpClientBackendService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./backend.service","name":"BackendService"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],null],"parameters":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}],"handle":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"HttpClientBackendService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./backend.service","name":"BackendService"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],null],"parameters":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}],"handle":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"HttpClientBackendService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./backend.service","name":"BackendService","line":54,"character":46},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":53,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":58,"character":5},"arguments":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":58,"character":12}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":58,"character":36}}],null],"parameters":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":57,"character":20},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfigArgs","line":58,"character":55},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory","line":59,"character":24}]}],"handle":[{"__symbolic":"method"}],"getJsonBody":[{"__symbolic":"method"}],"getRequestMethod":[{"__symbolic":"method"}],"createHeaders":[{"__symbolic":"method"}],"createQueryMap":[{"__symbolic":"method"}],"createResponse$fromResponseOptions$":[{"__symbolic":"method"}],"createPassThruBackend":[{"__symbolic":"method"}]}}}}]

@@ -1,2 +0,1 @@

////// HttpClient-Only version ////
import { NgModule } from '@angular/core';

@@ -12,3 +11,3 @@ import { HttpBackend, XhrFactory } from '@angular/common/http';

}
var HttpClientInMemoryWebApiModule = (function () {
var HttpClientInMemoryWebApiModule = /** @class */ (function () {
function HttpClientInMemoryWebApiModule() {

@@ -31,3 +30,33 @@ }

*/
HttpClientInMemoryWebApiModule.forRoot = function (dbCreator, options) {
/**
* Redirect the Angular `HttpClient` XHR calls
* to in-memory data store that implements `InMemoryDbService`.
* with class that implements InMemoryDbService and creates an in-memory database.
*
* Usually imported in the root application module.
* Can import in a lazy feature module too, which will shadow modules loaded earlier
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* HttpInMemoryWebApiModule.forRoot(dbCreator);
* HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
HttpClientInMemoryWebApiModule.forRoot = /**
* Redirect the Angular `HttpClient` XHR calls
* to in-memory data store that implements `InMemoryDbService`.
* with class that implements InMemoryDbService and creates an in-memory database.
*
* Usually imported in the root application module.
* Can import in a lazy feature module too, which will shadow modules loaded earlier
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* HttpInMemoryWebApiModule.forRoot(dbCreator);
* HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
function (dbCreator, options) {
return {

@@ -50,13 +79,25 @@ ngModule: HttpClientInMemoryWebApiModule,

*/
HttpClientInMemoryWebApiModule.forFeature = function (dbCreator, options) {
/**
*
* Enable and configure the in-memory web api in a lazy-loaded feature module.
* Same as `forRoot`.
* This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.
*/
HttpClientInMemoryWebApiModule.forFeature = /**
*
* Enable and configure the in-memory web api in a lazy-loaded feature module.
* Same as `forRoot`.
* This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.
*/
function (dbCreator, options) {
return HttpClientInMemoryWebApiModule.forRoot(dbCreator, options);
};
HttpClientInMemoryWebApiModule.decorators = [
{ type: NgModule, args: [{},] },
];
/** @nocollapse */
HttpClientInMemoryWebApiModule.ctorParameters = function () { return []; };
return HttpClientInMemoryWebApiModule;
}());
export { HttpClientInMemoryWebApiModule };
HttpClientInMemoryWebApiModule.decorators = [
{ type: NgModule, args: [{},] },
];
/** @nocollapse */
HttpClientInMemoryWebApiModule.ctorParameters = function () { return []; };
//# sourceMappingURL=http-client-in-memory-web-api.module.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"HttpClientInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"HttpClientInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}]
[{"__symbolic":"module","version":4,"metadata":{"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"HttpClientInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":24,"character":1},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":45,"character":19},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":46,"character":19},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend","line":48,"character":19},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":50,"character":17},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":50,"character":36},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory","line":50,"character":59}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}]

@@ -1,2 +0,1 @@

////// Http-Only version ////
import { Injector, NgModule } from '@angular/core';

@@ -12,3 +11,3 @@ import { XHRBackend } from '@angular/http';

}
var HttpInMemoryWebApiModule = (function () {
var HttpInMemoryWebApiModule = /** @class */ (function () {
function HttpInMemoryWebApiModule() {

@@ -31,3 +30,33 @@ }

*/
HttpInMemoryWebApiModule.forRoot = function (dbCreator, options) {
/**
* Redirect the Angular `Http` XHR calls
* to in-memory data store that implements `InMemoryDbService`.
* with class that implements InMemoryDbService and creates an in-memory database.
*
* Usually imported in the root application module.
* Can import in a lazy feature module too, which will shadow modules loaded earlier
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* HttpInMemoryWebApiModule.forRoot(dbCreator);
* HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
HttpInMemoryWebApiModule.forRoot = /**
* Redirect the Angular `Http` XHR calls
* to in-memory data store that implements `InMemoryDbService`.
* with class that implements InMemoryDbService and creates an in-memory database.
*
* Usually imported in the root application module.
* Can import in a lazy feature module too, which will shadow modules loaded earlier
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* HttpInMemoryWebApiModule.forRoot(dbCreator);
* HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
function (dbCreator, options) {
return {

@@ -50,13 +79,25 @@ ngModule: HttpInMemoryWebApiModule,

*/
HttpInMemoryWebApiModule.forFeature = function (dbCreator, options) {
/**
*
* Enable and configure the in-memory web api in a lazy-loaded feature module.
* Same as `forRoot`.
* This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.
*/
HttpInMemoryWebApiModule.forFeature = /**
*
* Enable and configure the in-memory web api in a lazy-loaded feature module.
* Same as `forRoot`.
* This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.
*/
function (dbCreator, options) {
return HttpInMemoryWebApiModule.forRoot(dbCreator, options);
};
HttpInMemoryWebApiModule.decorators = [
{ type: NgModule, args: [{},] },
];
/** @nocollapse */
HttpInMemoryWebApiModule.ctorParameters = function () { return []; };
return HttpInMemoryWebApiModule;
}());
export { HttpInMemoryWebApiModule };
HttpInMemoryWebApiModule.decorators = [
{ type: NgModule, args: [{},] },
];
/** @nocollapse */
HttpInMemoryWebApiModule.ctorParameters = function () { return []; };
//# sourceMappingURL=http-in-memory-web-api.module.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"HttpInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"HttpInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}]
[{"__symbolic":"module","version":4,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"HttpInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":24,"character":1},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":45,"character":19},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":46,"character":19},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend","line":48,"character":19},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":50,"character":17},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":50,"character":27},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":50,"character":46}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}]

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"STATUS":{"CONTINUE":100,"SWITCHING_PROTOCOLS":101,"OK":200,"CREATED":201,"ACCEPTED":202,"NON_AUTHORITATIVE_INFORMATION":203,"NO_CONTENT":204,"RESET_CONTENT":205,"PARTIAL_CONTENT":206,"MULTIPLE_CHOICES":300,"MOVED_PERMANTENTLY":301,"FOUND":302,"SEE_OTHER":303,"NOT_MODIFIED":304,"USE_PROXY":305,"TEMPORARY_REDIRECT":307,"BAD_REQUEST":400,"UNAUTHORIZED":401,"PAYMENT_REQUIRED":402,"FORBIDDEN":403,"NOT_FOUND":404,"METHOD_NOT_ALLOWED":405,"NOT_ACCEPTABLE":406,"PROXY_AUTHENTICATION_REQUIRED":407,"REQUEST_TIMEOUT":408,"CONFLICT":409,"GONE":410,"LENGTH_REQUIRED":411,"PRECONDITION_FAILED":412,"PAYLOAD_TO_LARGE":413,"URI_TOO_LONG":414,"UNSUPPORTED_MEDIA_TYPE":415,"RANGE_NOT_SATISFIABLE":416,"EXPECTATION_FAILED":417,"IM_A_TEAPOT":418,"UPGRADE_REQUIRED":426,"INTERNAL_SERVER_ERROR":500,"NOT_IMPLEMENTED":501,"BAD_GATEWAY":502,"SERVICE_UNAVAILABLE":503,"GATEWAY_TIMEOUT":504,"HTTP_VERSION_NOT_SUPPORTED":505,"PROCESSING":102,"MULTI_STATUS":207,"IM_USED":226,"PERMANENT_REDIRECT":308,"UNPROCESSABLE_ENTRY":422,"LOCKED":423,"FAILED_DEPENDENCY":424,"PRECONDITION_REQUIRED":428,"TOO_MANY_REQUESTS":429,"REQUEST_HEADER_FIELDS_TOO_LARGE":431,"UNAVAILABLE_FOR_LEGAL_REASONS":451,"VARIANT_ALSO_NEGOTIATES":506,"INSUFFICIENT_STORAGE":507,"NETWORK_AUTHENTICATION_REQUIRED":511},"STATUS_CODE_INFO":{"100":{"code":100,"text":"Continue","description":"\"The initial part of a request has been received and has not yet been rejected by the server.\"","spec_title":"RFC7231#6.2.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.2.1","$quoted$":["code","text","description","spec_title","spec_href"]},"101":{"code":101,"text":"Switching Protocols","description":"\"The server understands and is willing to comply with the client's request, via the Upgrade header field, for a change in the application protocol being used on this connection.\"","spec_title":"RFC7231#6.2.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.2.2","$quoted$":["code","text","description","spec_title","spec_href"]},"102":{"code":102,"text":"Processing","description":"\"An interim response to inform the client that the server has accepted the complete request, but has not yet completed it.\"","spec_title":"RFC5218#10.1","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.1","$quoted$":["code","text","description","spec_title","spec_href"]},"200":{"code":200,"text":"OK","description":"\"The request has succeeded.\"","spec_title":"RFC7231#6.3.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.1","$quoted$":["code","text","description","spec_title","spec_href"]},"201":{"code":201,"text":"Created","description":"\"The request has been fulfilled and has resulted in one or more new resources being created.\"","spec_title":"RFC7231#6.3.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.2","$quoted$":["code","text","description","spec_title","spec_href"]},"202":{"code":202,"text":"Accepted","description":"\"The request has been accepted for processing, but the processing has not been completed.\"","spec_title":"RFC7231#6.3.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.3","$quoted$":["code","text","description","spec_title","spec_href"]},"203":{"code":203,"text":"Non-Authoritative Information","description":"\"The request was successful but the enclosed payload has been modified from that of the origin server's 200 (OK) response by a transforming proxy.\"","spec_title":"RFC7231#6.3.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.4","$quoted$":["code","text","description","spec_title","spec_href"]},"204":{"code":204,"text":"No Content","description":"\"The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.\"","spec_title":"RFC7231#6.3.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.5","$quoted$":["code","text","description","spec_title","spec_href"]},"205":{"code":205,"text":"Reset Content","description":"\"The server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\"","spec_title":"RFC7231#6.3.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.6","$quoted$":["code","text","description","spec_title","spec_href"]},"206":{"code":206,"text":"Partial Content","description":"\"The server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the requests's Range header field.\"","spec_title":"RFC7233#4.1","spec_href":"http://tools.ietf.org/html/rfc7233#section-4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"207":{"code":207,"text":"Multi-Status","description":"\"Status for multiple independent operations.\"","spec_title":"RFC5218#10.2","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.2","$quoted$":["code","text","description","spec_title","spec_href"]},"226":{"code":226,"text":"IM Used","description":"\"The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\"","spec_title":"RFC3229#10.4.1","spec_href":"http://tools.ietf.org/html/rfc3229#section-10.4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"300":{"code":300,"text":"Multiple Choices","description":"\"The target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.\"","spec_title":"RFC7231#6.4.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"301":{"code":301,"text":"Moved Permanently","description":"\"The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.\"","spec_title":"RFC7231#6.4.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.2","$quoted$":["code","text","description","spec_title","spec_href"]},"302":{"code":302,"text":"Found","description":"\"The target resource resides temporarily under a different URI.\"","spec_title":"RFC7231#6.4.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.3","$quoted$":["code","text","description","spec_title","spec_href"]},"303":{"code":303,"text":"See Other","description":"\"The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, that is intended to provide an indirect response to the original request.\"","spec_title":"RFC7231#6.4.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.4","$quoted$":["code","text","description","spec_title","spec_href"]},"304":{"code":304,"text":"Not Modified","description":"\"A conditional GET request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition has evaluated to false.\"","spec_title":"RFC7232#4.1","spec_href":"http://tools.ietf.org/html/rfc7232#section-4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"305":{"code":305,"text":"Use Proxy","description":"*deprecated*","spec_title":"RFC7231#6.4.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.5","$quoted$":["code","text","description","spec_title","spec_href"]},"307":{"code":307,"text":"Temporary Redirect","description":"\"The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.\"","spec_title":"RFC7231#6.4.7","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.7","$quoted$":["code","text","description","spec_title","spec_href"]},"308":{"code":308,"text":"Permanent Redirect","description":"\"The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. [...] This status code is similar to 301 Moved Permanently (Section 7.3.2 of rfc7231), except that it does not allow rewriting the request method from POST to GET.\"","spec_title":"RFC7238","spec_href":"http://tools.ietf.org/html/rfc7238","$quoted$":["code","text","description","spec_title","spec_href"]},"400":{"code":400,"text":"Bad Request","description":"\"The server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process.\"","spec_title":"RFC7231#6.5.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.1","$quoted$":["code","text","description","spec_title","spec_href"]},"401":{"code":401,"text":"Unauthorized","description":"\"The request has not been applied because it lacks valid authentication credentials for the target resource.\"","spec_title":"RFC7235#6.3.1","spec_href":"http://tools.ietf.org/html/rfc7235#section-3.1","$quoted$":["code","text","description","spec_title","spec_href"]},"402":{"code":402,"text":"Payment Required","description":"*reserved*","spec_title":"RFC7231#6.5.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.2","$quoted$":["code","text","description","spec_title","spec_href"]},"403":{"code":403,"text":"Forbidden","description":"\"The server understood the request but refuses to authorize it.\"","spec_title":"RFC7231#6.5.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.3","$quoted$":["code","text","description","spec_title","spec_href"]},"404":{"code":404,"text":"Not Found","description":"\"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.\"","spec_title":"RFC7231#6.5.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.4","$quoted$":["code","text","description","spec_title","spec_href"]},"405":{"code":405,"text":"Method Not Allowed","description":"\"The method specified in the request-line is known by the origin server but not supported by the target resource.\"","spec_title":"RFC7231#6.5.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.5","$quoted$":["code","text","description","spec_title","spec_href"]},"406":{"code":406,"text":"Not Acceptable","description":"\"The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.\"","spec_title":"RFC7231#6.5.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.6","$quoted$":["code","text","description","spec_title","spec_href"]},"407":{"code":407,"text":"Proxy Authentication Required","description":"\"The client needs to authenticate itself in order to use a proxy.\"","spec_title":"RFC7231#6.3.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.2","$quoted$":["code","text","description","spec_title","spec_href"]},"408":{"code":408,"text":"Request Timeout","description":"\"The server did not receive a complete request message within the time that it was prepared to wait.\"","spec_title":"RFC7231#6.5.7","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.7","$quoted$":["code","text","description","spec_title","spec_href"]},"409":{"code":409,"text":"Conflict","description":"\"The request could not be completed due to a conflict with the current state of the resource.\"","spec_title":"RFC7231#6.5.8","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.8","$quoted$":["code","text","description","spec_title","spec_href"]},"410":{"code":410,"text":"Gone","description":"\"Access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.\"","spec_title":"RFC7231#6.5.9","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.9","$quoted$":["code","text","description","spec_title","spec_href"]},"411":{"code":411,"text":"Length Required","description":"\"The server refuses to accept the request without a defined Content-Length.\"","spec_title":"RFC7231#6.5.10","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.10","$quoted$":["code","text","description","spec_title","spec_href"]},"412":{"code":412,"text":"Precondition Failed","description":"\"One or more preconditions given in the request header fields evaluated to false when tested on the server.\"","spec_title":"RFC7232#4.2","spec_href":"http://tools.ietf.org/html/rfc7232#section-4.2","$quoted$":["code","text","description","spec_title","spec_href"]},"413":{"code":413,"text":"Payload Too Large","description":"\"The server is refusing to process a request because the request payload is larger than the server is willing or able to process.\"","spec_title":"RFC7231#6.5.11","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.11","$quoted$":["code","text","description","spec_title","spec_href"]},"414":{"code":414,"text":"URI Too Long","description":"\"The server is refusing to service the request because the request-target is longer than the server is willing to interpret.\"","spec_title":"RFC7231#6.5.12","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.12","$quoted$":["code","text","description","spec_title","spec_href"]},"415":{"code":415,"text":"Unsupported Media Type","description":"\"The origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.\"","spec_title":"RFC7231#6.5.13","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.13","$quoted$":["code","text","description","spec_title","spec_href"]},"416":{"code":416,"text":"Range Not Satisfiable","description":"\"None of the ranges in the request's Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.\"","spec_title":"RFC7233#4.4","spec_href":"http://tools.ietf.org/html/rfc7233#section-4.4","$quoted$":["code","text","description","spec_title","spec_href"]},"417":{"code":417,"text":"Expectation Failed","description":"\"The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.\"","spec_title":"RFC7231#6.5.14","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.14","$quoted$":["code","text","description","spec_title","spec_href"]},"418":{"code":418,"text":"I'm a teapot","description":"\"1988 April Fools Joke. Returned by tea pots requested to brew coffee.\"","spec_title":"RFC 2324","spec_href":"https://tools.ietf.org/html/rfc2324","$quoted$":["code","text","description","spec_title","spec_href"]},"422":{"code":422,"text":"Unprocessable Entity","description":"\"The server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.\"","spec_title":"RFC5218#10.3","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.3","$quoted$":["code","text","description","spec_title","spec_href"]},"423":{"code":423,"text":"Locked","description":"\"The source or destination resource of a method is locked.\"","spec_title":"RFC5218#10.4","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.4","$quoted$":["code","text","description","spec_title","spec_href"]},"424":{"code":424,"text":"Failed Dependency","description":"\"The method could not be performed on the resource because the requested action depended on another action and that action failed.\"","spec_title":"RFC5218#10.5","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.5","$quoted$":["code","text","description","spec_title","spec_href"]},"426":{"code":426,"text":"Upgrade Required","description":"\"The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\"","spec_title":"RFC7231#6.5.15","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.15","$quoted$":["code","text","description","spec_title","spec_href"]},"428":{"code":428,"text":"Precondition Required","description":"\"The origin server requires the request to be conditional.\"","spec_title":"RFC6585#3","spec_href":"http://tools.ietf.org/html/rfc6585#section-3","$quoted$":["code","text","description","spec_title","spec_href"]},"429":{"code":429,"text":"Too Many Requests","description":"\"The user has sent too many requests in a given amount of time (\"rate limiting\").\"","spec_title":"RFC6585#4","spec_href":"http://tools.ietf.org/html/rfc6585#section-4","$quoted$":["code","text","description","spec_title","spec_href"]},"431":{"code":431,"text":"Request Header Fields Too Large","description":"\"The server is unwilling to process the request because its header fields are too large.\"","spec_title":"RFC6585#5","spec_href":"http://tools.ietf.org/html/rfc6585#section-5","$quoted$":["code","text","description","spec_title","spec_href"]},"451":{"code":451,"text":"Unavailable For Legal Reasons","description":"\"The server is denying access to the resource in response to a legal demand.\"","spec_title":"draft-ietf-httpbis-legally-restricted-status","spec_href":"http://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status","$quoted$":["code","text","description","spec_title","spec_href"]},"500":{"code":500,"text":"Internal Server Error","description":"\"The server encountered an unexpected condition that prevented it from fulfilling the request.\"","spec_title":"RFC7231#6.6.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.1","$quoted$":["code","text","description","spec_title","spec_href"]},"501":{"code":501,"text":"Not Implemented","description":"\"The server does not support the functionality required to fulfill the request.\"","spec_title":"RFC7231#6.6.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.2","$quoted$":["code","text","description","spec_title","spec_href"]},"502":{"code":502,"text":"Bad Gateway","description":"\"The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\"","spec_title":"RFC7231#6.6.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.3","$quoted$":["code","text","description","spec_title","spec_href"]},"503":{"code":503,"text":"Service Unavailable","description":"\"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.\"","spec_title":"RFC7231#6.6.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.4","$quoted$":["code","text","description","spec_title","spec_href"]},"504":{"code":504,"text":"Gateway Time-out","description":"\"The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\"","spec_title":"RFC7231#6.6.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.5","$quoted$":["code","text","description","spec_title","spec_href"]},"505":{"code":505,"text":"HTTP Version Not Supported","description":"\"The server does not support, or refuses to support, the protocol version that was used in the request message.\"","spec_title":"RFC7231#6.6.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.6","$quoted$":["code","text","description","spec_title","spec_href"]},"506":{"code":506,"text":"Variant Also Negotiates","description":"\"The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\"","spec_title":"RFC2295#8.1","spec_href":"http://tools.ietf.org/html/rfc2295#section-8.1","$quoted$":["code","text","description","spec_title","spec_href"]},"507":{"code":507,"text":"Insufficient Storage","description":"The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.\"","spec_title":"RFC5218#10.6","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.6","$quoted$":["code","text","description","spec_title","spec_href"]},"511":{"code":511,"text":"Network Authentication Required","description":"\"The client needs to authenticate to gain network access.\"","spec_title":"RFC6585#6","spec_href":"http://tools.ietf.org/html/rfc6585#section-6","$quoted$":["code","text","description","spec_title","spec_href"]},"$quoted$":["100","101","200","201","202","203","204","205","206","300","301","302","303","304","305","307","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","426","500","501","502","503","504","505","102","207","226","308","422","423","424","428","429","431","451","506","507","511"]},"getStatusText":{"__symbolic":"function","parameters":["status"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"STATUS_CODE_INFO"},"index":{"__symbolic":"reference","name":"status"}},"member":"text"},"right":"Unknown Status"}},"isSuccess":{"__symbolic":"function","parameters":["status"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":">=","left":{"__symbolic":"reference","name":"status"},"right":200},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"reference","name":"status"},"right":300}}}}},{"__symbolic":"module","version":1,"metadata":{"STATUS":{"CONTINUE":100,"SWITCHING_PROTOCOLS":101,"OK":200,"CREATED":201,"ACCEPTED":202,"NON_AUTHORITATIVE_INFORMATION":203,"NO_CONTENT":204,"RESET_CONTENT":205,"PARTIAL_CONTENT":206,"MULTIPLE_CHOICES":300,"MOVED_PERMANTENTLY":301,"FOUND":302,"SEE_OTHER":303,"NOT_MODIFIED":304,"USE_PROXY":305,"TEMPORARY_REDIRECT":307,"BAD_REQUEST":400,"UNAUTHORIZED":401,"PAYMENT_REQUIRED":402,"FORBIDDEN":403,"NOT_FOUND":404,"METHOD_NOT_ALLOWED":405,"NOT_ACCEPTABLE":406,"PROXY_AUTHENTICATION_REQUIRED":407,"REQUEST_TIMEOUT":408,"CONFLICT":409,"GONE":410,"LENGTH_REQUIRED":411,"PRECONDITION_FAILED":412,"PAYLOAD_TO_LARGE":413,"URI_TOO_LONG":414,"UNSUPPORTED_MEDIA_TYPE":415,"RANGE_NOT_SATISFIABLE":416,"EXPECTATION_FAILED":417,"IM_A_TEAPOT":418,"UPGRADE_REQUIRED":426,"INTERNAL_SERVER_ERROR":500,"NOT_IMPLEMENTED":501,"BAD_GATEWAY":502,"SERVICE_UNAVAILABLE":503,"GATEWAY_TIMEOUT":504,"HTTP_VERSION_NOT_SUPPORTED":505,"PROCESSING":102,"MULTI_STATUS":207,"IM_USED":226,"PERMANENT_REDIRECT":308,"UNPROCESSABLE_ENTRY":422,"LOCKED":423,"FAILED_DEPENDENCY":424,"PRECONDITION_REQUIRED":428,"TOO_MANY_REQUESTS":429,"REQUEST_HEADER_FIELDS_TOO_LARGE":431,"UNAVAILABLE_FOR_LEGAL_REASONS":451,"VARIANT_ALSO_NEGOTIATES":506,"INSUFFICIENT_STORAGE":507,"NETWORK_AUTHENTICATION_REQUIRED":511},"STATUS_CODE_INFO":{"100":{"code":100,"text":"Continue","description":"\"The initial part of a request has been received and has not yet been rejected by the server.\"","spec_title":"RFC7231#6.2.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.2.1"},"101":{"code":101,"text":"Switching Protocols","description":"\"The server understands and is willing to comply with the client's request, via the Upgrade header field, for a change in the application protocol being used on this connection.\"","spec_title":"RFC7231#6.2.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.2.2"},"102":{"code":102,"text":"Processing","description":"\"An interim response to inform the client that the server has accepted the complete request, but has not yet completed it.\"","spec_title":"RFC5218#10.1","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.1"},"200":{"code":200,"text":"OK","description":"\"The request has succeeded.\"","spec_title":"RFC7231#6.3.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.1"},"201":{"code":201,"text":"Created","description":"\"The request has been fulfilled and has resulted in one or more new resources being created.\"","spec_title":"RFC7231#6.3.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.2"},"202":{"code":202,"text":"Accepted","description":"\"The request has been accepted for processing, but the processing has not been completed.\"","spec_title":"RFC7231#6.3.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.3"},"203":{"code":203,"text":"Non-Authoritative Information","description":"\"The request was successful but the enclosed payload has been modified from that of the origin server's 200 (OK) response by a transforming proxy.\"","spec_title":"RFC7231#6.3.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.4"},"204":{"code":204,"text":"No Content","description":"\"The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.\"","spec_title":"RFC7231#6.3.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.5"},"205":{"code":205,"text":"Reset Content","description":"\"The server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\"","spec_title":"RFC7231#6.3.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.6"},"206":{"code":206,"text":"Partial Content","description":"\"The server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the requests's Range header field.\"","spec_title":"RFC7233#4.1","spec_href":"http://tools.ietf.org/html/rfc7233#section-4.1"},"207":{"code":207,"text":"Multi-Status","description":"\"Status for multiple independent operations.\"","spec_title":"RFC5218#10.2","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.2"},"226":{"code":226,"text":"IM Used","description":"\"The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\"","spec_title":"RFC3229#10.4.1","spec_href":"http://tools.ietf.org/html/rfc3229#section-10.4.1"},"300":{"code":300,"text":"Multiple Choices","description":"\"The target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.\"","spec_title":"RFC7231#6.4.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.1"},"301":{"code":301,"text":"Moved Permanently","description":"\"The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.\"","spec_title":"RFC7231#6.4.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.2"},"302":{"code":302,"text":"Found","description":"\"The target resource resides temporarily under a different URI.\"","spec_title":"RFC7231#6.4.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.3"},"303":{"code":303,"text":"See Other","description":"\"The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, that is intended to provide an indirect response to the original request.\"","spec_title":"RFC7231#6.4.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.4"},"304":{"code":304,"text":"Not Modified","description":"\"A conditional GET request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition has evaluated to false.\"","spec_title":"RFC7232#4.1","spec_href":"http://tools.ietf.org/html/rfc7232#section-4.1"},"305":{"code":305,"text":"Use Proxy","description":"*deprecated*","spec_title":"RFC7231#6.4.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.5"},"307":{"code":307,"text":"Temporary Redirect","description":"\"The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.\"","spec_title":"RFC7231#6.4.7","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.7"},"308":{"code":308,"text":"Permanent Redirect","description":"\"The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. [...] This status code is similar to 301 Moved Permanently (Section 7.3.2 of rfc7231), except that it does not allow rewriting the request method from POST to GET.\"","spec_title":"RFC7238","spec_href":"http://tools.ietf.org/html/rfc7238"},"400":{"code":400,"text":"Bad Request","description":"\"The server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process.\"","spec_title":"RFC7231#6.5.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.1"},"401":{"code":401,"text":"Unauthorized","description":"\"The request has not been applied because it lacks valid authentication credentials for the target resource.\"","spec_title":"RFC7235#6.3.1","spec_href":"http://tools.ietf.org/html/rfc7235#section-3.1"},"402":{"code":402,"text":"Payment Required","description":"*reserved*","spec_title":"RFC7231#6.5.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.2"},"403":{"code":403,"text":"Forbidden","description":"\"The server understood the request but refuses to authorize it.\"","spec_title":"RFC7231#6.5.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.3"},"404":{"code":404,"text":"Not Found","description":"\"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.\"","spec_title":"RFC7231#6.5.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.4"},"405":{"code":405,"text":"Method Not Allowed","description":"\"The method specified in the request-line is known by the origin server but not supported by the target resource.\"","spec_title":"RFC7231#6.5.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.5"},"406":{"code":406,"text":"Not Acceptable","description":"\"The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.\"","spec_title":"RFC7231#6.5.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.6"},"407":{"code":407,"text":"Proxy Authentication Required","description":"\"The client needs to authenticate itself in order to use a proxy.\"","spec_title":"RFC7231#6.3.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.2"},"408":{"code":408,"text":"Request Timeout","description":"\"The server did not receive a complete request message within the time that it was prepared to wait.\"","spec_title":"RFC7231#6.5.7","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.7"},"409":{"code":409,"text":"Conflict","description":"\"The request could not be completed due to a conflict with the current state of the resource.\"","spec_title":"RFC7231#6.5.8","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.8"},"410":{"code":410,"text":"Gone","description":"\"Access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.\"","spec_title":"RFC7231#6.5.9","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.9"},"411":{"code":411,"text":"Length Required","description":"\"The server refuses to accept the request without a defined Content-Length.\"","spec_title":"RFC7231#6.5.10","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.10"},"412":{"code":412,"text":"Precondition Failed","description":"\"One or more preconditions given in the request header fields evaluated to false when tested on the server.\"","spec_title":"RFC7232#4.2","spec_href":"http://tools.ietf.org/html/rfc7232#section-4.2"},"413":{"code":413,"text":"Payload Too Large","description":"\"The server is refusing to process a request because the request payload is larger than the server is willing or able to process.\"","spec_title":"RFC7231#6.5.11","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.11"},"414":{"code":414,"text":"URI Too Long","description":"\"The server is refusing to service the request because the request-target is longer than the server is willing to interpret.\"","spec_title":"RFC7231#6.5.12","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.12"},"415":{"code":415,"text":"Unsupported Media Type","description":"\"The origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.\"","spec_title":"RFC7231#6.5.13","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.13"},"416":{"code":416,"text":"Range Not Satisfiable","description":"\"None of the ranges in the request's Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.\"","spec_title":"RFC7233#4.4","spec_href":"http://tools.ietf.org/html/rfc7233#section-4.4"},"417":{"code":417,"text":"Expectation Failed","description":"\"The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.\"","spec_title":"RFC7231#6.5.14","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.14"},"418":{"code":418,"text":"I'm a teapot","description":"\"1988 April Fools Joke. Returned by tea pots requested to brew coffee.\"","spec_title":"RFC 2324","spec_href":"https://tools.ietf.org/html/rfc2324"},"422":{"code":422,"text":"Unprocessable Entity","description":"\"The server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.\"","spec_title":"RFC5218#10.3","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.3"},"423":{"code":423,"text":"Locked","description":"\"The source or destination resource of a method is locked.\"","spec_title":"RFC5218#10.4","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.4"},"424":{"code":424,"text":"Failed Dependency","description":"\"The method could not be performed on the resource because the requested action depended on another action and that action failed.\"","spec_title":"RFC5218#10.5","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.5"},"426":{"code":426,"text":"Upgrade Required","description":"\"The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\"","spec_title":"RFC7231#6.5.15","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.15"},"428":{"code":428,"text":"Precondition Required","description":"\"The origin server requires the request to be conditional.\"","spec_title":"RFC6585#3","spec_href":"http://tools.ietf.org/html/rfc6585#section-3"},"429":{"code":429,"text":"Too Many Requests","description":"\"The user has sent too many requests in a given amount of time (\"rate limiting\").\"","spec_title":"RFC6585#4","spec_href":"http://tools.ietf.org/html/rfc6585#section-4"},"431":{"code":431,"text":"Request Header Fields Too Large","description":"\"The server is unwilling to process the request because its header fields are too large.\"","spec_title":"RFC6585#5","spec_href":"http://tools.ietf.org/html/rfc6585#section-5"},"451":{"code":451,"text":"Unavailable For Legal Reasons","description":"\"The server is denying access to the resource in response to a legal demand.\"","spec_title":"draft-ietf-httpbis-legally-restricted-status","spec_href":"http://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status"},"500":{"code":500,"text":"Internal Server Error","description":"\"The server encountered an unexpected condition that prevented it from fulfilling the request.\"","spec_title":"RFC7231#6.6.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.1"},"501":{"code":501,"text":"Not Implemented","description":"\"The server does not support the functionality required to fulfill the request.\"","spec_title":"RFC7231#6.6.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.2"},"502":{"code":502,"text":"Bad Gateway","description":"\"The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\"","spec_title":"RFC7231#6.6.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.3"},"503":{"code":503,"text":"Service Unavailable","description":"\"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.\"","spec_title":"RFC7231#6.6.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.4"},"504":{"code":504,"text":"Gateway Time-out","description":"\"The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\"","spec_title":"RFC7231#6.6.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.5"},"505":{"code":505,"text":"HTTP Version Not Supported","description":"\"The server does not support, or refuses to support, the protocol version that was used in the request message.\"","spec_title":"RFC7231#6.6.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.6"},"506":{"code":506,"text":"Variant Also Negotiates","description":"\"The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\"","spec_title":"RFC2295#8.1","spec_href":"http://tools.ietf.org/html/rfc2295#section-8.1"},"507":{"code":507,"text":"Insufficient Storage","description":"The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.\"","spec_title":"RFC5218#10.6","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.6"},"511":{"code":511,"text":"Network Authentication Required","description":"\"The client needs to authenticate to gain network access.\"","spec_title":"RFC6585#6","spec_href":"http://tools.ietf.org/html/rfc6585#section-6"}},"getStatusText":{"__symbolic":"function","parameters":["status"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"STATUS_CODE_INFO"},"index":{"__symbolic":"reference","name":"status"}},"member":"text"},"right":"Unknown Status"}},"isSuccess":{"__symbolic":"function","parameters":["status"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":">=","left":{"__symbolic":"reference","name":"status"},"right":200},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"reference","name":"status"},"right":300}}}}}]
[{"__symbolic":"module","version":4,"metadata":{"STATUS":{"CONTINUE":100,"SWITCHING_PROTOCOLS":101,"OK":200,"CREATED":201,"ACCEPTED":202,"NON_AUTHORITATIVE_INFORMATION":203,"NO_CONTENT":204,"RESET_CONTENT":205,"PARTIAL_CONTENT":206,"MULTIPLE_CHOICES":300,"MOVED_PERMANTENTLY":301,"FOUND":302,"SEE_OTHER":303,"NOT_MODIFIED":304,"USE_PROXY":305,"TEMPORARY_REDIRECT":307,"BAD_REQUEST":400,"UNAUTHORIZED":401,"PAYMENT_REQUIRED":402,"FORBIDDEN":403,"NOT_FOUND":404,"METHOD_NOT_ALLOWED":405,"NOT_ACCEPTABLE":406,"PROXY_AUTHENTICATION_REQUIRED":407,"REQUEST_TIMEOUT":408,"CONFLICT":409,"GONE":410,"LENGTH_REQUIRED":411,"PRECONDITION_FAILED":412,"PAYLOAD_TO_LARGE":413,"URI_TOO_LONG":414,"UNSUPPORTED_MEDIA_TYPE":415,"RANGE_NOT_SATISFIABLE":416,"EXPECTATION_FAILED":417,"IM_A_TEAPOT":418,"UPGRADE_REQUIRED":426,"INTERNAL_SERVER_ERROR":500,"NOT_IMPLEMENTED":501,"BAD_GATEWAY":502,"SERVICE_UNAVAILABLE":503,"GATEWAY_TIMEOUT":504,"HTTP_VERSION_NOT_SUPPORTED":505,"PROCESSING":102,"MULTI_STATUS":207,"IM_USED":226,"PERMANENT_REDIRECT":308,"UNPROCESSABLE_ENTRY":422,"LOCKED":423,"FAILED_DEPENDENCY":424,"PRECONDITION_REQUIRED":428,"TOO_MANY_REQUESTS":429,"REQUEST_HEADER_FIELDS_TOO_LARGE":431,"UNAVAILABLE_FOR_LEGAL_REASONS":451,"VARIANT_ALSO_NEGOTIATES":506,"INSUFFICIENT_STORAGE":507,"NETWORK_AUTHENTICATION_REQUIRED":511},"STATUS_CODE_INFO":{"100":{"code":100,"text":"Continue","description":"\"The initial part of a request has been received and has not yet been rejected by the server.\"","spec_title":"RFC7231#6.2.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.2.1","$quoted$":["code","text","description","spec_title","spec_href"]},"101":{"code":101,"text":"Switching Protocols","description":"\"The server understands and is willing to comply with the client's request, via the Upgrade header field, for a change in the application protocol being used on this connection.\"","spec_title":"RFC7231#6.2.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.2.2","$quoted$":["code","text","description","spec_title","spec_href"]},"102":{"code":102,"text":"Processing","description":"\"An interim response to inform the client that the server has accepted the complete request, but has not yet completed it.\"","spec_title":"RFC5218#10.1","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.1","$quoted$":["code","text","description","spec_title","spec_href"]},"200":{"code":200,"text":"OK","description":"\"The request has succeeded.\"","spec_title":"RFC7231#6.3.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.1","$quoted$":["code","text","description","spec_title","spec_href"]},"201":{"code":201,"text":"Created","description":"\"The request has been fulfilled and has resulted in one or more new resources being created.\"","spec_title":"RFC7231#6.3.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.2","$quoted$":["code","text","description","spec_title","spec_href"]},"202":{"code":202,"text":"Accepted","description":"\"The request has been accepted for processing, but the processing has not been completed.\"","spec_title":"RFC7231#6.3.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.3","$quoted$":["code","text","description","spec_title","spec_href"]},"203":{"code":203,"text":"Non-Authoritative Information","description":"\"The request was successful but the enclosed payload has been modified from that of the origin server's 200 (OK) response by a transforming proxy.\"","spec_title":"RFC7231#6.3.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.4","$quoted$":["code","text","description","spec_title","spec_href"]},"204":{"code":204,"text":"No Content","description":"\"The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.\"","spec_title":"RFC7231#6.3.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.5","$quoted$":["code","text","description","spec_title","spec_href"]},"205":{"code":205,"text":"Reset Content","description":"\"The server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\"","spec_title":"RFC7231#6.3.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.6","$quoted$":["code","text","description","spec_title","spec_href"]},"206":{"code":206,"text":"Partial Content","description":"\"The server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the requests's Range header field.\"","spec_title":"RFC7233#4.1","spec_href":"http://tools.ietf.org/html/rfc7233#section-4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"207":{"code":207,"text":"Multi-Status","description":"\"Status for multiple independent operations.\"","spec_title":"RFC5218#10.2","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.2","$quoted$":["code","text","description","spec_title","spec_href"]},"226":{"code":226,"text":"IM Used","description":"\"The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\"","spec_title":"RFC3229#10.4.1","spec_href":"http://tools.ietf.org/html/rfc3229#section-10.4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"300":{"code":300,"text":"Multiple Choices","description":"\"The target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.\"","spec_title":"RFC7231#6.4.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"301":{"code":301,"text":"Moved Permanently","description":"\"The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.\"","spec_title":"RFC7231#6.4.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.2","$quoted$":["code","text","description","spec_title","spec_href"]},"302":{"code":302,"text":"Found","description":"\"The target resource resides temporarily under a different URI.\"","spec_title":"RFC7231#6.4.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.3","$quoted$":["code","text","description","spec_title","spec_href"]},"303":{"code":303,"text":"See Other","description":"\"The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, that is intended to provide an indirect response to the original request.\"","spec_title":"RFC7231#6.4.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.4","$quoted$":["code","text","description","spec_title","spec_href"]},"304":{"code":304,"text":"Not Modified","description":"\"A conditional GET request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition has evaluated to false.\"","spec_title":"RFC7232#4.1","spec_href":"http://tools.ietf.org/html/rfc7232#section-4.1","$quoted$":["code","text","description","spec_title","spec_href"]},"305":{"code":305,"text":"Use Proxy","description":"*deprecated*","spec_title":"RFC7231#6.4.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.5","$quoted$":["code","text","description","spec_title","spec_href"]},"307":{"code":307,"text":"Temporary Redirect","description":"\"The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.\"","spec_title":"RFC7231#6.4.7","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.4.7","$quoted$":["code","text","description","spec_title","spec_href"]},"308":{"code":308,"text":"Permanent Redirect","description":"\"The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. [...] This status code is similar to 301 Moved Permanently (Section 7.3.2 of rfc7231), except that it does not allow rewriting the request method from POST to GET.\"","spec_title":"RFC7238","spec_href":"http://tools.ietf.org/html/rfc7238","$quoted$":["code","text","description","spec_title","spec_href"]},"400":{"code":400,"text":"Bad Request","description":"\"The server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process.\"","spec_title":"RFC7231#6.5.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.1","$quoted$":["code","text","description","spec_title","spec_href"]},"401":{"code":401,"text":"Unauthorized","description":"\"The request has not been applied because it lacks valid authentication credentials for the target resource.\"","spec_title":"RFC7235#6.3.1","spec_href":"http://tools.ietf.org/html/rfc7235#section-3.1","$quoted$":["code","text","description","spec_title","spec_href"]},"402":{"code":402,"text":"Payment Required","description":"*reserved*","spec_title":"RFC7231#6.5.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.2","$quoted$":["code","text","description","spec_title","spec_href"]},"403":{"code":403,"text":"Forbidden","description":"\"The server understood the request but refuses to authorize it.\"","spec_title":"RFC7231#6.5.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.3","$quoted$":["code","text","description","spec_title","spec_href"]},"404":{"code":404,"text":"Not Found","description":"\"The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.\"","spec_title":"RFC7231#6.5.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.4","$quoted$":["code","text","description","spec_title","spec_href"]},"405":{"code":405,"text":"Method Not Allowed","description":"\"The method specified in the request-line is known by the origin server but not supported by the target resource.\"","spec_title":"RFC7231#6.5.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.5","$quoted$":["code","text","description","spec_title","spec_href"]},"406":{"code":406,"text":"Not Acceptable","description":"\"The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.\"","spec_title":"RFC7231#6.5.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.6","$quoted$":["code","text","description","spec_title","spec_href"]},"407":{"code":407,"text":"Proxy Authentication Required","description":"\"The client needs to authenticate itself in order to use a proxy.\"","spec_title":"RFC7231#6.3.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.3.2","$quoted$":["code","text","description","spec_title","spec_href"]},"408":{"code":408,"text":"Request Timeout","description":"\"The server did not receive a complete request message within the time that it was prepared to wait.\"","spec_title":"RFC7231#6.5.7","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.7","$quoted$":["code","text","description","spec_title","spec_href"]},"409":{"code":409,"text":"Conflict","description":"\"The request could not be completed due to a conflict with the current state of the resource.\"","spec_title":"RFC7231#6.5.8","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.8","$quoted$":["code","text","description","spec_title","spec_href"]},"410":{"code":410,"text":"Gone","description":"\"Access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.\"","spec_title":"RFC7231#6.5.9","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.9","$quoted$":["code","text","description","spec_title","spec_href"]},"411":{"code":411,"text":"Length Required","description":"\"The server refuses to accept the request without a defined Content-Length.\"","spec_title":"RFC7231#6.5.10","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.10","$quoted$":["code","text","description","spec_title","spec_href"]},"412":{"code":412,"text":"Precondition Failed","description":"\"One or more preconditions given in the request header fields evaluated to false when tested on the server.\"","spec_title":"RFC7232#4.2","spec_href":"http://tools.ietf.org/html/rfc7232#section-4.2","$quoted$":["code","text","description","spec_title","spec_href"]},"413":{"code":413,"text":"Payload Too Large","description":"\"The server is refusing to process a request because the request payload is larger than the server is willing or able to process.\"","spec_title":"RFC7231#6.5.11","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.11","$quoted$":["code","text","description","spec_title","spec_href"]},"414":{"code":414,"text":"URI Too Long","description":"\"The server is refusing to service the request because the request-target is longer than the server is willing to interpret.\"","spec_title":"RFC7231#6.5.12","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.12","$quoted$":["code","text","description","spec_title","spec_href"]},"415":{"code":415,"text":"Unsupported Media Type","description":"\"The origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.\"","spec_title":"RFC7231#6.5.13","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.13","$quoted$":["code","text","description","spec_title","spec_href"]},"416":{"code":416,"text":"Range Not Satisfiable","description":"\"None of the ranges in the request's Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.\"","spec_title":"RFC7233#4.4","spec_href":"http://tools.ietf.org/html/rfc7233#section-4.4","$quoted$":["code","text","description","spec_title","spec_href"]},"417":{"code":417,"text":"Expectation Failed","description":"\"The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.\"","spec_title":"RFC7231#6.5.14","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.14","$quoted$":["code","text","description","spec_title","spec_href"]},"418":{"code":418,"text":"I'm a teapot","description":"\"1988 April Fools Joke. Returned by tea pots requested to brew coffee.\"","spec_title":"RFC 2324","spec_href":"https://tools.ietf.org/html/rfc2324","$quoted$":["code","text","description","spec_title","spec_href"]},"422":{"code":422,"text":"Unprocessable Entity","description":"\"The server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.\"","spec_title":"RFC5218#10.3","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.3","$quoted$":["code","text","description","spec_title","spec_href"]},"423":{"code":423,"text":"Locked","description":"\"The source or destination resource of a method is locked.\"","spec_title":"RFC5218#10.4","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.4","$quoted$":["code","text","description","spec_title","spec_href"]},"424":{"code":424,"text":"Failed Dependency","description":"\"The method could not be performed on the resource because the requested action depended on another action and that action failed.\"","spec_title":"RFC5218#10.5","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.5","$quoted$":["code","text","description","spec_title","spec_href"]},"426":{"code":426,"text":"Upgrade Required","description":"\"The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\"","spec_title":"RFC7231#6.5.15","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.5.15","$quoted$":["code","text","description","spec_title","spec_href"]},"428":{"code":428,"text":"Precondition Required","description":"\"The origin server requires the request to be conditional.\"","spec_title":"RFC6585#3","spec_href":"http://tools.ietf.org/html/rfc6585#section-3","$quoted$":["code","text","description","spec_title","spec_href"]},"429":{"code":429,"text":"Too Many Requests","description":"\"The user has sent too many requests in a given amount of time (\"rate limiting\").\"","spec_title":"RFC6585#4","spec_href":"http://tools.ietf.org/html/rfc6585#section-4","$quoted$":["code","text","description","spec_title","spec_href"]},"431":{"code":431,"text":"Request Header Fields Too Large","description":"\"The server is unwilling to process the request because its header fields are too large.\"","spec_title":"RFC6585#5","spec_href":"http://tools.ietf.org/html/rfc6585#section-5","$quoted$":["code","text","description","spec_title","spec_href"]},"451":{"code":451,"text":"Unavailable For Legal Reasons","description":"\"The server is denying access to the resource in response to a legal demand.\"","spec_title":"draft-ietf-httpbis-legally-restricted-status","spec_href":"http://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status","$quoted$":["code","text","description","spec_title","spec_href"]},"500":{"code":500,"text":"Internal Server Error","description":"\"The server encountered an unexpected condition that prevented it from fulfilling the request.\"","spec_title":"RFC7231#6.6.1","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.1","$quoted$":["code","text","description","spec_title","spec_href"]},"501":{"code":501,"text":"Not Implemented","description":"\"The server does not support the functionality required to fulfill the request.\"","spec_title":"RFC7231#6.6.2","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.2","$quoted$":["code","text","description","spec_title","spec_href"]},"502":{"code":502,"text":"Bad Gateway","description":"\"The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\"","spec_title":"RFC7231#6.6.3","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.3","$quoted$":["code","text","description","spec_title","spec_href"]},"503":{"code":503,"text":"Service Unavailable","description":"\"The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.\"","spec_title":"RFC7231#6.6.4","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.4","$quoted$":["code","text","description","spec_title","spec_href"]},"504":{"code":504,"text":"Gateway Time-out","description":"\"The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\"","spec_title":"RFC7231#6.6.5","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.5","$quoted$":["code","text","description","spec_title","spec_href"]},"505":{"code":505,"text":"HTTP Version Not Supported","description":"\"The server does not support, or refuses to support, the protocol version that was used in the request message.\"","spec_title":"RFC7231#6.6.6","spec_href":"http://tools.ietf.org/html/rfc7231#section-6.6.6","$quoted$":["code","text","description","spec_title","spec_href"]},"506":{"code":506,"text":"Variant Also Negotiates","description":"\"The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\"","spec_title":"RFC2295#8.1","spec_href":"http://tools.ietf.org/html/rfc2295#section-8.1","$quoted$":["code","text","description","spec_title","spec_href"]},"507":{"code":507,"text":"Insufficient Storage","description":"The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.\"","spec_title":"RFC5218#10.6","spec_href":"http://tools.ietf.org/html/rfc2518#section-10.6","$quoted$":["code","text","description","spec_title","spec_href"]},"511":{"code":511,"text":"Network Authentication Required","description":"\"The client needs to authenticate to gain network access.\"","spec_title":"RFC6585#6","spec_href":"http://tools.ietf.org/html/rfc6585#section-6","$quoted$":["code","text","description","spec_title","spec_href"]},"$quoted$":["100","101","200","201","202","203","204","205","206","300","301","302","303","304","305","307","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","426","500","501","502","503","504","505","102","207","226","308","422","423","424","428","429","431","451","506","507","511"]},"getStatusText":{"__symbolic":"function","parameters":["status"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"STATUS_CODE_INFO"},"index":{"__symbolic":"reference","name":"status"}},"member":"text"},"right":"Unknown Status"}},"isSuccess":{"__symbolic":"function","parameters":["status"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":">=","left":{"__symbolic":"reference","name":"status"},"right":200},"right":{"__symbolic":"binop","operator":"<","left":{"__symbolic":"reference","name":"status"},"right":300}}}}}]

@@ -1,2 +0,1 @@

////// For apps with both Http and HttpClient ////
import { Injector, NgModule } from '@angular/core';

@@ -8,3 +7,3 @@ import { XHRBackend } from '@angular/http';

import { httpClientInMemBackendServiceFactory } from './http-client-in-memory-web-api.module';
var InMemoryWebApiModule = (function () {
var InMemoryWebApiModule = /** @class */ (function () {
function InMemoryWebApiModule() {

@@ -27,3 +26,33 @@ }

*/
InMemoryWebApiModule.forRoot = function (dbCreator, options) {
/**
* Redirect BOTH Angular `Http` and `HttpClient` XHR calls
* to in-memory data store that implements `InMemoryDbService`.
* with class that implements InMemoryDbService and creates an in-memory database.
*
* Usually imported in the root application module.
* Can import in a lazy feature module too, which will shadow modules loaded earlier
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* InMemoryWebApiModule.forRoot(dbCreator);
* InMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
InMemoryWebApiModule.forRoot = /**
* Redirect BOTH Angular `Http` and `HttpClient` XHR calls
* to in-memory data store that implements `InMemoryDbService`.
* with class that implements InMemoryDbService and creates an in-memory database.
*
* Usually imported in the root application module.
* Can import in a lazy feature module too, which will shadow modules loaded earlier
*
* @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.
* @param {InMemoryBackendConfigArgs} [options]
*
* @example
* InMemoryWebApiModule.forRoot(dbCreator);
* InMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});
*/
function (dbCreator, options) {
return {

@@ -49,13 +78,25 @@ ngModule: InMemoryWebApiModule,

*/
InMemoryWebApiModule.forFeature = function (dbCreator, options) {
/**
*
* Enable and configure the in-memory web api in a lazy-loaded feature module.
* Same as `forRoot`.
* This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.
*/
InMemoryWebApiModule.forFeature = /**
*
* Enable and configure the in-memory web api in a lazy-loaded feature module.
* Same as `forRoot`.
* This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.
*/
function (dbCreator, options) {
return InMemoryWebApiModule.forRoot(dbCreator, options);
};
InMemoryWebApiModule.decorators = [
{ type: NgModule, args: [{},] },
];
/** @nocollapse */
InMemoryWebApiModule.ctorParameters = function () { return []; };
return InMemoryWebApiModule;
}());
export { InMemoryWebApiModule };
InMemoryWebApiModule.decorators = [
{ type: NgModule, args: [{},] },
];
/** @nocollapse */
InMemoryWebApiModule.ctorParameters = function () { return []; };
//# sourceMappingURL=in-memory-web-api.module.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","module":"./http-in-memory-web-api.module","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","module":"./http-client-in-memory-web-api.module","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","module":"./http-in-memory-web-api.module","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","module":"./http-client-in-memory-web-api.module","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}]
[{"__symbolic":"module","version":4,"metadata":{"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":15,"character":1},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":36,"character":19},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":37,"character":19},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend","line":39,"character":19},"useFactory":{"__symbolic":"reference","module":"./http-in-memory-web-api.module","name":"httpInMemBackendServiceFactory","line":40,"character":22},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":41,"character":17},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":41,"character":27},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":41,"character":46}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend","line":43,"character":19},"useFactory":{"__symbolic":"reference","module":"./http-client-in-memory-web-api.module","name":"httpClientInMemBackendServiceFactory","line":44,"character":22},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService","line":45,"character":17},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig","line":45,"character":36},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory","line":45,"character":59}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}]

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./http-in-memory-web-api.module"},{"from":"./http-client-in-memory-web-api.module"},{"from":"./interfaces"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./http-in-memory-web-api.module"},{"from":"./http-client-in-memory-web-api.module"},{"from":"./interfaces"}]}]
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./http-in-memory-web-api.module"},{"from":"./http-client-in-memory-web-api.module"},{"from":"./interfaces"}]}]

@@ -1,2 +0,2 @@

import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**

@@ -3,0 +3,0 @@ * Minimum definition needed by base class

@@ -12,3 +12,13 @@ import { Injectable } from '@angular/core';

*/
var InMemoryDbService = (function () {
var /**
* Interface for a class that creates an in-memory database
*
* Its `createDb` method creates a hash of named collections that represents the database
*
* For maximum flexibility, the service may define HTTP method overrides.
* Such methods must match the spelling of an HTTP method in lower case (e.g, "get").
* If a request has a matching method, it will be called as in
* `get(info: requestInfo, db: {})` where `db` is the database object described above.
*/
InMemoryDbService = /** @class */ (function () {
function InMemoryDbService() {

@@ -18,2 +28,12 @@ }

}());
/**
* Interface for a class that creates an in-memory database
*
* Its `createDb` method creates a hash of named collections that represents the database
*
* For maximum flexibility, the service may define HTTP method overrides.
* Such methods must match the spelling of an HTTP method in lower case (e.g, "get").
* If a request has a matching method, it will be called as in
* `get(info: requestInfo, db: {})` where `db` is the database object described above.
*/
export { InMemoryDbService };

@@ -23,3 +43,6 @@ /**

*/
var InMemoryBackendConfigArgs = (function () {
var /**
* Interface for InMemoryBackend configuration options
*/
InMemoryBackendConfigArgs = /** @class */ (function () {
function InMemoryBackendConfigArgs() {

@@ -29,4 +52,6 @@ }

}());
/**
* Interface for InMemoryBackend configuration options
*/
export { InMemoryBackendConfigArgs };
/////////////////////////////////
/**

@@ -40,3 +65,3 @@ * InMemoryBackendService configuration options

*/
var InMemoryBackendConfig = (function () {
var InMemoryBackendConfig = /** @class */ (function () {
function InMemoryBackendConfig(config) {

@@ -48,24 +73,34 @@ if (config === void 0) { config = {}; }

dataEncapsulation: false,
// do NOT wrap content within an object with a `data` property
delay: 500,
// simulate latency by delaying response
delete404: false,
// don't complain if can't find entity to delete
passThruUnknownUrl: false,
// 404 if can't process URL
post204: true,
// don't return the item after a POST
post409: false,
// don't update existing item with that ID
put204: true,
// don't return the item after a PUT
put404: false,
// create new item if PUT item with that ID not found
apiBase: undefined,
// assumed to be the first path segment
host: undefined,
// default value is actually set in InMemoryBackendService ctor
rootPath: undefined // default value is actually set in InMemoryBackendService ctor
}, config);
}
InMemoryBackendConfig.decorators = [
{ type: Injectable },
];
/** @nocollapse */
InMemoryBackendConfig.ctorParameters = function () { return [
{ type: InMemoryBackendConfigArgs, },
]; };
return InMemoryBackendConfig;
}());
export { InMemoryBackendConfig };
InMemoryBackendConfig.decorators = [
{ type: Injectable },
];
/** @nocollapse */
InMemoryBackendConfig.ctorParameters = function () { return [
{ type: InMemoryBackendConfigArgs, },
]; };
/** Return information (UriInfo) about a URI */

@@ -72,0 +107,0 @@ export function parseUri(str) {

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"HeadersCore":{"__symbolic":"interface"},"InMemoryDbService":{"__symbolic":"class","members":{"createDb":[{"__symbolic":"method"}]}},"InMemoryBackendConfigArgs":{"__symbolic":"class"},"InMemoryBackendConfig":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InMemoryBackendConfigArgs"}]}]}},"parseUri":{"__symbolic":"function"},"ParsedRequestUrl":{"__symbolic":"interface"},"PassThruBackend":{"__symbolic":"interface"},"removeTrailingSlash":{"__symbolic":"function","parameters":["path"],"value":{"__symbolic":"error","message":"Expression form not supported","line":181,"character":22}},"RequestCore":{"__symbolic":"interface"},"RequestInfo":{"__symbolic":"interface"},"RequestInfoUtilities":{"__symbolic":"interface"},"ResponseOptions":{"__symbolic":"interface"},"UriInfo":{"__symbolic":"interface"}}},{"__symbolic":"module","version":1,"metadata":{"HeadersCore":{"__symbolic":"interface"},"InMemoryDbService":{"__symbolic":"class","members":{"createDb":[{"__symbolic":"method"}]}},"InMemoryBackendConfigArgs":{"__symbolic":"class"},"InMemoryBackendConfig":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InMemoryBackendConfigArgs"}]}]}},"parseUri":{"__symbolic":"function"},"ParsedRequestUrl":{"__symbolic":"interface"},"PassThruBackend":{"__symbolic":"interface"},"removeTrailingSlash":{"__symbolic":"function","parameters":["path"],"value":{"__symbolic":"error","message":"Expression form not supported","line":181,"character":22}},"RequestCore":{"__symbolic":"interface"},"RequestInfo":{"__symbolic":"interface"},"RequestInfoUtilities":{"__symbolic":"interface"},"ResponseOptions":{"__symbolic":"interface"},"UriInfo":{"__symbolic":"interface"}}}]
[{"__symbolic":"module","version":4,"metadata":{"HeadersCore":{"__symbolic":"interface"},"InMemoryDbService":{"__symbolic":"class","members":{"createDb":[{"__symbolic":"method"}]}},"InMemoryBackendConfigArgs":{"__symbolic":"class"},"InMemoryBackendConfig":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":104,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"InMemoryBackendConfigArgs"}]}]}},"parseUri":{"__symbolic":"function"},"ParsedRequestUrl":{"__symbolic":"interface"},"PassThruBackend":{"__symbolic":"interface"},"removeTrailingSlash":{"__symbolic":"function","parameters":["path"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"path"},"member":"replace"},"arguments":[{"__symbolic":"error","message":"Expression form not supported","line":181,"character":22},""]}},"RequestCore":{"__symbolic":"interface"},"RequestInfo":{"__symbolic":"interface"},"RequestInfoUtilities":{"__symbolic":"interface"},"ResponseInterceptor":{"__symbolic":"interface"},"ResponseOptions":{"__symbolic":"interface"},"UriInfo":{"__symbolic":"interface"}}}]
{
"name": "angular-in-memory-web-api",
"version": "0.5.4",
"version": "0.6.0",
"description": "An in-memory web api for Angular demos and tests",

@@ -31,18 +31,17 @@ "main": "bundles/in-memory-web-api.umd.js",

"peerDependencies": {
"@angular/common": ">=2.0.0 <6.0.0",
"@angular/core": ">=2.0.0 <6.0.0",
"@angular/http": ">=2.0.0 <6.0.0",
"rxjs": "^5.1.0"
"@angular/common": "^6.0.0-rc.0",
"@angular/core": "^6.0.0-rc.0",
"@angular/http": "^6.0.0-rc.0",
"rxjs": "^6.0.0-beta.1"
},
"devDependencies": {
"@angular/animations": "~4.3.1",
"@angular/common": "~4.3.1",
"@angular/compiler": "~4.3.1",
"@angular/compiler-cli": "~4.3.1",
"@angular/core": "~4.3.1",
"@angular/http": "~4.3.1",
"@angular/platform-browser": "~4.3.1",
"@angular/platform-browser-dynamic": "~4.3.1",
"@angular/platform-server": "~4.3.1",
"@angular/tsc-wrapped": "~4.3.1",
"@angular/animations": "6.0.0-rc.0",
"@angular/common": "6.0.0-rc.0",
"@angular/compiler": "6.0.0-rc.0",
"@angular/compiler-cli": "6.0.0-rc.0",
"@angular/core": "6.0.0-rc.0",
"@angular/http": "6.0.0-rc.0",
"@angular/platform-browser": "6.0.0-rc.0",
"@angular/platform-browser-dynamic": "6.0.0-rc.0",
"@angular/platform-server": "6.0.0-rc.0",
"@types/jasmine": "2.5.54",

@@ -78,6 +77,6 @@ "@types/jasmine-ajax": "^3.1.37",

"rollup-stream": "^1.24.1",
"rxjs": "^5.1.0",
"rxjs": "^6.0.0-beta.1",
"systemjs": "0.20.18",
"tslint": "^3.15.1",
"typescript": "~2.3.2",
"typescript": "~2.7.2",
"vinyl-source-stream": "^1.1.0",

@@ -84,0 +83,0 @@ "webpack": "2.2.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc