Skip to content

Commit 7e523f6

Browse files
committed
stream response
1 parent 43bd9a6 commit 7e523f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,9 @@ class SocketSdk {
286286

287287
try {
288288
const client = await this.#getClient()
289-
const data = await client.get(`orgs/${orgSlugParam}/full-scans/${fullScanIdParam}`).json()
290-
return { success: true, status: 200, data }
289+
const readStream = await client.stream(`orgs/${orgSlugParam}/full-scans/${fullScanIdParam}`).pipe(process.stdout)
290+
291+
return { success: true, status: 200, data: readStream }
291292
} catch (err) {
292293
return /** @type {SocketSdkErrorType<'getOrgFullScan'>} */ (this.#handleApiError(err))
293294
}

0 commit comments

Comments
 (0)