@richie-rpc/core 1.2.0 → 1.2.1
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 +6 -0
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -86,8 +86,14 @@ import { buildUrl } from '@richie-rpc/core';
|
|
|
86
86
|
|
|
87
87
|
buildUrl('http://api.example.com', '/users', { limit: '10', offset: '0' });
|
|
88
88
|
// => 'http://api.example.com/users?limit=10&offset=0'
|
|
89
|
+
|
|
90
|
+
// With basePath in baseUrl
|
|
91
|
+
buildUrl('http://api.example.com/api', '/users');
|
|
92
|
+
// => 'http://api.example.com/api/users'
|
|
89
93
|
```
|
|
90
94
|
|
|
95
|
+
The `buildUrl` function properly concatenates the baseUrl with the path, supporting basePath prefixes in the baseUrl.
|
|
96
|
+
|
|
91
97
|
## Status Codes
|
|
92
98
|
|
|
93
99
|
Use the `Status` const object for type-safe status codes:
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/package.json
CHANGED