Skip to content

Commit 551fbf7

Browse files
Debug: log body type and content start
1 parent 591a4ae commit 551fbf7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,11 @@
452452
}
453453
}
454454

455-
console.log(`HTTP ${method} ${url}`, { bodySize: requestBody?.length });
455+
console.log(`HTTP ${method} ${url}`, {
456+
bodySize: requestBody?.length,
457+
bodyType: requestBody?.constructor?.name,
458+
bodyStart: requestBody ? new TextDecoder().decode(requestBody.slice(0, 50)) : null
459+
});
456460

457461
// Make the request
458462
const res = await fetch(url, {

0 commit comments

Comments
 (0)