clp
clp copied to clipboard
clp-core: Add custom headers support for NetworkReader
Description
Modified constructors of NetworkReader
, DownloaderThread
and CurlDownloadHandler
to support custom headers passed by users.
Validation performed
Added the Authorization
header with a Bearer
token to fetch a file from remote, validating the file's size.
Summary by CodeRabbit
-
New Features
- Enhanced
CurlDownloadHandler
andNetworkReader
constructors to accept custom HTTP headers, allowing for more flexible HTTP requests. - Custom headers can now be specified during the instantiation of both
CurlDownloadHandler
andNetworkReader
.
- Enhanced
-
Tests
- Added a new test case for
NetworkReader
to validate the handling of custom HTTP headers, ensuring expected headers are included and illegal ones are excluded.
- Added a new test case for
-
Bug Fixes
- No specific bug fixes were noted in this release.
-
Documentation
- Updated constructor signatures to reflect the addition of the custom headers parameter.