github lostisland/faraday v2.16.0.beta1

pre-releaseone hour ago

Warning

This is a beta release. Test your application with it before 2.16.0, and report anything that breaks in #1647.

Options classes are no longer Structs

ConnectionOptions, RequestOptions, SSLOptions, ProxyOptions and Env now inherit from the new Faraday::BaseOptions instead of Faraday::Options (a Struct). BaseOptions handles nested coercion, deep merging and deep copies in one place.

The adapters and middleware in awesome-faraday work unchanged. We also tested the 100 most-downloaded gems that depend on Faraday, and restored the Struct methods they call (#1743, #1746). Code that uses other Struct methods on the options (each, keys, dig, ==, positional new) can break. The upgrading guide lists what to write instead.

Deprecated, to be removed in 3.0 (no runtime warning yet):

  • [], []=, fetch and key? on RequestOptions, SSLOptions and ProxyOptions
  • to_h, empty? and the class method members on the options classes
  • Faraday::Options.memoized

What's Changed

  • Document options supported by the Net::HTTP adapter by @olleolleolle in #1731
  • Foundation: Create OptionsLike module and BaseOptions class by @iMacTia with @Copilot in #1656
  • fix: keep Response API when omitting request data by @yykamei in #1736
  • Convert ProxyOptions, RequestOptions, SSLOptions to BaseOptions (#1651) by @iMacTia in #1733
  • Convert ConnectionOptions to BaseOptions (#1652) by @iMacTia in #1738
  • Use safe Oj decoders in the JSON middleware docs by @orien in #1739
  • Convert Env to BaseOptions (#1653) by @iMacTia in #1740
  • fix: restore []= on RequestOptions, SSLOptions and ProxyOptions by @iMacTia in #1743
  • fix: restore members, empty? and to_h on the options classes by @iMacTia in #1746
  • fix: look up symbol keys in Headers#include? like the other lookups do by @Branson404 in #1748
  • Document the Options refactor and its migration (#1654) by @iMacTia in #1741
  • Document Authorization middleware schemes, Token auth, and 1.x migration by @lyn1dev in #1744
  • Match stub headers case-insensitively in strict mode by @draarivpatel-ui in #1745
  • Decode hashes and arrays nested inside an array by @ihamzatarar in #1742

New Contributors

Full Changelog: v2.15.1...v2.16.0.beta1

Don't miss a new faraday release

NewReleases is sending notifications on new releases.