Skip to content

Commit 921b001

Browse files
fix(cognito): add logs for all requests
1 parent 0693cd5 commit 921b001

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/javascript/src/lib/api-service.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ const makeRequest = async (options) => {
3535

3636
const url = new URL(options.path, apiUrl);
3737

38+
console.log("@@url: ", url)
39+
console.log("@@request: ", {
40+
url: url.toString(),
41+
method: options.method || 'get',
42+
headers: {...headers, 'Authorization': `Bearer ${options.token}`},
43+
data: options.body
44+
})
45+
3846
try {
3947
const response = await request({
4048
validateStatus: validStatus,

0 commit comments

Comments
 (0)