http-request-manager 4.1.2 → 4.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,28 +3,26 @@
3
3
  This library has 4 main services that simplify http requests, http request state and local storage states.
4
4
 
5
5
  1) [HttpRequestManager](./README/REQUEST_MANAGER_README.md) (service): This service provides http requests (CRUD operations)
6
-
7
6
  2) [HttpRequestStateManager](./README/REQUEST_STATE_MANAGER_README.md) (service): This service manages HTTP requests by maintaining state, eliminating the need to construct separate API calls for POST, PUT, and DELETE operations. It uses a GET request to retrieve an array of items and applies standard REST rules to update the state. When the state changes—either by adding a new record or modifying an existing one—the service automatically performs the appropriate POST, PUT, or DELETE requests without requiring explicit API calls.
8
-
9
7
  3) [LocalStorageManager](./README/LOCAL_STORAGE_MANAGER_README.md) (service): Enables the storage of data object structures in either localStorage or sessionStorage, maintaining an updated state to reflect storage changes. This approach eliminates the need to manually serialize and deserialize data structures using JSON.stringify and JSON.parse, streamlining data handling. By synchronizing state with storage updates, the service ensures immediate availability of the current state without relying on timers, thereby preventing potential side effects associated with delayed storage operations.
10
-
11
8
  4) [DatabaseManagerService](./README/DATABASE_MANAGER_README.md) (beta): This extends the `Http-Request-State-Manager` with persistent storage using `DexieJS`, a minimalistic wrapper for IndexedDB (local browser DB). This service defines a table linked to HTTP requests, storing the retrieved data locally. Upon subsequent requests, the `Http-Request-State-Manager` checks the local database first; if the data is absent, it proceeds with the HTTP request. This approach reduces redundant HTTP requests, enhances application responsiveness, and enables offline functionality without requiring an internet connection.
9
+ 5) [Interceptors](./README/INTERCEPTORS_README.md): General interceptors that may be applied to the providers for requests.
10
+ This includes:
12
11
 
13
- 5) [Interceptors](./README/INTERCEPTORS_README.md): General interceptors that may be applied to the providers for requests.
14
- This includes:
15
-
16
- - credentials - adds the { credentials: true } options for secure cookies to be persistent
17
-
18
- - proxy-debugger for debugging api requests
19
-
20
- - request-error for catching all requests the error with 400-500 status and presents a toast-message (snackbar) with the error
21
-
22
- - request-header provides a few properties that are added to all requests
23
- - 'Content-Type': 'application/json', // BE header for json type requests
24
- - 'Accept-Language': this.language || 'en-CA', //language localization
25
- - 'Current-Date': this.currentDate //todays date
12
+ - credentials - adds the { credentials: true } options for secure cookies to be persistent
13
+ - proxy-debugger for debugging api requests
14
+ - request-error for catching all requests the error with 400-500 status and presents a toast-message (snackbar) with the error
15
+ - request-header provides a few properties that are added to all requests
26
16
 
17
+ - 'Content-Type': 'application/json', // BE header for json type requests
18
+ - 'Accept-Language': this.language || 'en-CA', //language localization
19
+ - 'Current-Date': this.currentDate //todays date
27
20
  6) [Proxy-Config](./README/INTERCEPTORS_README.md) Support: This allows for proxies to be used when requests are made that are defined.
21
+ 7) Demos available for all the above that demonstrate all functionality
22
+
23
+ - import `HttpRequestManagerModule`
24
+ - add the selector `<app-http-request-services-demo></app-http-request-services-demo>` to a template
25
+ - explore the many options - Top right menus toggles between the above services
28
26
 
29
27
  ## HttpServiceManager, HttpRequestStateManager and DatabaseManagerService Features:
30
28
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-request-manager",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "This library has 4 main services that simplify http requests, http request state and local storage states.",
5
5
  "author": "Michele Bonifacio",
6
6
  "company": "wavecoders.ca",
Binary file