cobrili-client 1.0.3 → 1.0.4
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 +8 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,11 +38,8 @@ npm install cobrili-client
|
|
|
38
38
|
import { createCobriliClient } from 'cobrili-client';
|
|
39
39
|
|
|
40
40
|
const client = createCobriliClient({
|
|
41
|
-
baseUrl: '
|
|
42
|
-
endpoint: '/api/cobrili'
|
|
43
|
-
headers: {
|
|
44
|
-
'Authorization': 'Basic ' + btoa('user:pass')
|
|
45
|
-
}
|
|
41
|
+
baseUrl: 'https://your-server.com',
|
|
42
|
+
endpoint: '/api/cobrili'
|
|
46
43
|
});
|
|
47
44
|
|
|
48
45
|
// Initialize session (required before making API calls)
|
|
@@ -69,11 +66,11 @@ if (helpsets.data) {
|
|
|
69
66
|
import { createCobriliClient } from 'cobrili-client';
|
|
70
67
|
|
|
71
68
|
const client = createCobriliClient({
|
|
72
|
-
baseUrl: '
|
|
73
|
-
endpoint: '/api/cobrili',
|
|
74
|
-
timeout: 30000,
|
|
75
|
-
headers: {},
|
|
76
|
-
debug: false
|
|
69
|
+
baseUrl: 'https://your-server.com', // Backend server URL
|
|
70
|
+
endpoint: '/api/cobrili', // API endpoint path
|
|
71
|
+
timeout: 30000, // Request timeout in ms (optional)
|
|
72
|
+
headers: {}, // Custom headers (optional)
|
|
73
|
+
debug: false // Enable debug logging (optional)
|
|
77
74
|
});
|
|
78
75
|
```
|
|
79
76
|
|
|
@@ -214,7 +211,7 @@ console.log(Object.keys(API_METHODS));
|
|
|
214
211
|
```javascript
|
|
215
212
|
const { createCobriliClient } = require('cobrili-client');
|
|
216
213
|
|
|
217
|
-
const client = createCobriliClient({ baseUrl: '
|
|
214
|
+
const client = createCobriliClient({ baseUrl: 'https://your-server.com' });
|
|
218
215
|
await client.init();
|
|
219
216
|
```
|
|
220
217
|
|