Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HTTPoison functions #54

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fastjames
Copy link

@fastjames fastjames commented Jun 28, 2022

In order to remain compatible with newer (as of about 1.4.0) versions of HTTPoison, update override functions in Forcex.Api.Http and in Forcex.Bulk. These functions now treat headers as a keyword list, which requires changes to the function logic.

Closes #52

In order to cure dialyzer errors, update our process_response/1 function
overrides to treat `headers` as a keyword list.
@fastjames fastjames force-pushed the elixir_18_updates branch from 45db598 to 0d4d341 Compare June 28, 2022 18:49
In order to avoid conflict with the HTTPoison-provided get function and
its typespec, rename `get/3` to `client_get/3`. Perform the same
defensive rename for `post/3`.
According to dialyzer, (results -- seen_results) will always be a List
so the second case option will never be reached. With only one option,
the case statement itself is no longer needed.
@fastjames fastjames force-pushed the elixir_18_updates branch from 0d4d341 to 2016092 Compare June 29, 2022 21:03
@fastjames
Copy link
Author

While my ultimate goal is to bring the library up to date with the latest versions for elixir and dependencies, I wanted to start with a green slate by fixing the outstanding dialyzer failures with as few changes as possible.

@fastjames
Copy link
Author

I have a branch that brings all deps up to date and updates elixir/OTP to 1.13 / 24: https://github.com/fastjames/forcex/tree/elixir_113 . Once this PR has been merged I'll rebase that branch and open a PR on it.

@edennis
Copy link

edennis commented Feb 15, 2023

@jeffweiss Any chance we could get this one merged? This keeps anyone using forcex tied to a version of httpoison that's 5 years old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typespec mismatch with HTTPoison.process_response/1
2 participants