feat(HTTP Request Node): Move from Binary Buffer to Binary streaming (#5610)

*  Change from binary buffer to binary streaming

* Remove console.logs

* Import Readable from the correct lib

* stream response

* parametersToKeyValue doesn't need to be async anymore

* Fix bodyParameter reduce method

* parametersToKeyValue doesn't need to be async anymore

* handle streaming responses

* send `Content-Length` and `Content-Type` on binary requests

* Add new helper function for binary data

* Add binary function to helpers interface

* Fix bug in error handler

* Fix issue with wrongfully assigned headers to body

* Fix test workflow

* Remove console.logs

* Remove unnecsessary type

* Remove concat dependency already imported in workflow package

* Update pnpm-lock file

* Small fixes, asyncronous error message

* reset the lockfile

* Remove buffer check and simplify error handling

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
agobrech
2023-03-09 15:38:54 +01:00
committed by GitHub
parent a9c63f980f
commit ce0d9d2bed
3 changed files with 54 additions and 33 deletions

View File

@@ -673,7 +673,7 @@ export interface BinaryHelperFunctions {
): Promise<IBinaryData>;
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
copyBinaryFile(filePath: string, fileName: string, mimeType?: string): Promise<IBinaryData>;
binaryToBuffer(body: Buffer | Readable): Promise<Buffer>;
getBinaryStream(binaryDataId: string, chunkSize?: number): Readable;
getBinaryMetadata(binaryDataId: string): Promise<BinaryMetadata>;
}