clp icon indicating copy to clipboard operation
clp copied to clipboard

clp-core: Add custom headers support for NetworkReader

Open anlowee opened this issue 4 months ago • 1 comments

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 and NetworkReader constructors to accept custom HTTP headers, allowing for more flexible HTTP requests.
    • Custom headers can now be specified during the instantiation of both CurlDownloadHandler and NetworkReader.
  • 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.
  • Bug Fixes

    • No specific bug fixes were noted in this release.
  • Documentation

    • Updated constructor signatures to reflect the addition of the custom headers parameter.

anlowee avatar Oct 24 '24 21:10 anlowee