JuliaLang / Downloads.jl

MIT License
89 stars 34 forks source link

Add a `status_ok(response::Response)` method #199

Closed DilumAluthge closed 1 year ago

DilumAluthge commented 1 year ago

I'd like to use status_ok in Pkg. It would be most convenient if I can just write status_ok(response::Response) and not have to worry about the internal layout of the Response struct.

codecov[bot] commented 1 year ago

Codecov Report

Merging #199 (2841096) into master (78255d4) will increase coverage by 0.01%. The diff coverage is 100.00%.

:exclamation: Current head 2841096 differs from pull request most recent head c6ea371. Consider uploading reports for the commit c6ea371 to get more accurate results

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   92.20%   92.22%   +0.01%     
==========================================
  Files           5        5              
  Lines         526      527       +1     
==========================================
+ Hits          485      486       +1     
  Misses         41       41              
Impacted Files Coverage Δ
src/Downloads.jl 85.18% <100.00%> (+0.13%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 78255d4...c6ea371. Read the comment docs.

StefanKarpinski commented 1 year ago

I merged this as is but upon reflection, I wonder if we shouldn't change it from being owned by the Curl submodule to being in the top-level Downloads module and just have Curl implement the low-level logic. But probably doesn't really matter where the function comes from.