MegaApiClient icon indicating copy to clipboard operation
MegaApiClient copied to clipboard

Support compressed api response

Open igorquintaes opened this issue 2 years ago • 2 comments

Fixes #211, allowing to handle compressed responses from Mega API.

I was unable to run some automated tests - I noticed that some of them are integrated externally with Mega API, needing some previous configuration. As I am unsure how it could deal with my personal Mega account or the whole setup, I am trusting in an automated build and test run before my PR be merged. I didn't find any other references to a HttpClientHandler, neither in tests nor in checking SslProtocols.

If you prefer coverage with an automated test, I can do it after checking the test's project structure to write it following the current code design. I don't think creating 1k+ registries would be viable for an automated test. Maybe the better approach would be using a HttpClientHandler mock to assert that it was created - and called Mega API - with AutomaticDecompression with the expected value. But thinking about how to write this test, maybe it would be necessary to change the HttpClient object creation (private and static method) and be viable to mock and assert it. I really think could be hard to refactor it just to test in this way, and checking HttpClient object creation with reflection would be... to much?

igorquintaes avatar Sep 12 '22 02:09 igorquintaes

A lot of tests are failing, looks like due auth error... But dependabot automatic PRs too, so looks not related to this PR. Could you run it in your local machine or is even possible to fix it in pipeline?

igorquintaes avatar Sep 12 '22 03:09 igorquintaes

Thanks for the PR. Yes, I'm checking the tests and will fix them if needed

Thanks

gpailler avatar Sep 12 '22 05:09 gpailler

@igorquintaes v1.10.3 is available on Nuget with your PR. Thanks!

gpailler avatar Oct 16 '22 06:10 gpailler