Remove hackney dependency#172
Open
ericmj wants to merge 5 commits into
Open
Conversation
Delete get_stream/2, put_stream/3, and the read_response/1 helper. Reimplement get/2 and put/3 against Finch. Add Bypass + tests.
Rewrites both :hex_http behaviour callbacks to use Finch with manual redirect following (up to 5 hops, preserving method/body except on 303), and adds ExUnit tests using Bypass covering the main HTTP flows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate
Diff.HTTPandDiff.Hex.Adapterfrom hackney to Finch and drop hackney frommix.exs.{:finch, "~> 0.22.0"}as an explicit dep and startDiff.Finchin the supervisor.:hackney.get/putinDiff.HTTPwith Finch; delete the unusedget_stream/put_stream(no callers anywhere in the project).Diff.Hex.Adapter(:hex_httpcallback) using Finch — manual redirect following (301/302/303/307/308, max 5 hops, 303 switches to GET, relativelocationresolved viaURI.merge) andFinch.streamfor tarball downloads to file.:hackneyfrommix.exs. Drop unused:inetsfromextra_applications.{:bypass, "~> 2.1", only: :test}plus tests for the new HTTP code paths (status passthrough, error handling, redirect chain, tarball-to-file, 404 body skip).