Skip to content

Commit 135a171

Browse files
committed
readme
1 parent 8f987e4 commit 135a171

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/fetch-api-client/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ client.get('/endpoint')
3131
.then(response => console.log(response))
3232
.catch(error => console.error(error));
3333

34+
// GET request with query params
35+
client.get('/endpoint', { search: 'value' })
36+
.then(response => console.log(response))
37+
.catch(error => console.error(error));
38+
3439
// POST request with JSON body
35-
client.post('/endpoint', { key: 'value' })
40+
client.post('/endpoint', null, { key: 'value' })
3641
.then(response => console.log(response))
3742
.catch(error => console.error(error));
3843
```

packages/node-api-client/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ client.get('/endpoint')
3131
.then(response => console.log(response))
3232
.catch(error => console.error(error));
3333

34+
// GET request with query params
35+
client.get('/endpoint', { search: 'value' })
36+
.then(response => console.log(response))
37+
.catch(error => console.error(error));
38+
3439
// POST request with JSON body
35-
client.post('/endpoint', { key: 'value' })
40+
client.post('/endpoint', null, { key: 'value' })
3641
.then(response => console.log(response))
3742
.catch(error => console.error(error));
3843
```

0 commit comments

Comments
 (0)