edgurgel / edgurgel/httpoison

Specify default options

Open
#417 1 comment 9 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
2.3k
Forks
349
PR merge metrics
No merged PRs in 30d

Description

Hello there,

as of OTP 23 we are running into the issue that SSLv3 is no longer supported, which in itself is great. Howerver it seems that
HTTPPoison still attempts to use it, which raises an error.

```
(HTTPoison.Error) {:options, {:sslv3, {:versions, [:"tlsv1.2", :"tlsv1.1", :tlsv1, :sslv3]}}}
(httpoison 1.7.0) lib/httpoison.ex:128: HTTPoison.request!/5
```

This is easy to fix by simply adding `[ssl: [versions: :"tlsv1.2"]]` as an option when making HTTP requests. However, this become quite the maintenance burden when having to retroactively add this to every since request.

Skimming through the source code of hackney and HTTPPoison I did not see a config value to specify this as a default, but I'm quite sure I missed something as this seems like a common use case.

Thank you for your time

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at lib/httpoison.ex:128 and trace how request options are assembled before they reach Hackney. Check whether the project exposes a configuration entry point for shared SSL options, then verify that a configured default applies without adding the option to every request.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.