@labeg/tfetch 0.7.2 → 0.7.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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Installation
|
|
|
9
9
|
You can use the following command to install this package:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install
|
|
12
|
+
npm install @labeg/tfetch
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Usage
|
|
@@ -18,7 +18,7 @@ Usage
|
|
|
18
18
|
### Basic Usage
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import { tfetch } from "
|
|
21
|
+
import { tfetch } from "@labeg/tfetch";
|
|
22
22
|
|
|
23
23
|
// Example with primitive types
|
|
24
24
|
const fetchNumber = async () => {
|
|
@@ -35,7 +35,7 @@ fetchNumber();
|
|
|
35
35
|
### Working with Serializable Classes
|
|
36
36
|
|
|
37
37
|
```typescript
|
|
38
|
-
import { tfetch } from "
|
|
38
|
+
import { tfetch } from "@labeg/tfetch";
|
|
39
39
|
import { TestClass } from "./fixtures/TestClass";
|
|
40
40
|
|
|
41
41
|
const fetchClass = async () => {
|
|
@@ -52,7 +52,7 @@ fetchClass();
|
|
|
52
52
|
### CRUD Operations with `CrudHttpRepository`
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
|
-
import { CrudHttpRepository } from "
|
|
55
|
+
import { CrudHttpRepository } from "@labeg/tfetch";
|
|
56
56
|
import { TestClass } from "./fixtures/TestClass";
|
|
57
57
|
|
|
58
58
|
class TestRepository extends CrudHttpRepository<TestClass> {
|
|
@@ -75,7 +75,7 @@ fetchData();
|
|
|
75
75
|
The library provides custom error classes for handling network and backend errors:
|
|
76
76
|
|
|
77
77
|
```typescript
|
|
78
|
-
import { tfetch } from "
|
|
78
|
+
import { tfetch } from "@labeg/tfetch";
|
|
79
79
|
|
|
80
80
|
const fetchWithErrorHandling = async () => {
|
|
81
81
|
try {
|