MyGit

lostisland/faraday_middleware

Fork: 203 Star: 556 (更新于 2024-12-12 11:41:03)

license: MIT

Language: Ruby .

Various Faraday middlewares for Faraday-based API wrappers

最后发布版本: v1.2.1 ( 2024-09-23 21:27:43)

GitHub网址

Faraday Middleware

Gem Version CI

A collection of useful Faraday middleware. See the documentation.

gem install faraday_middleware

⚠️ DEPRECATION WARNING ⚠️

As highlighted in Faraday's UPGRADING guide, faraday_middleware is DEPRECATED, and will not be updated to support Faraday 2.0. If you rely on faraday_middleware in your project and would like to support Faraday 2.0:

  • The json middleware (request and response) are now both bundled with Faraday 🙌
  • The instrumentation middleware is bundled with Faraday
  • All other middlewares, they'll be re-released as independent gems compatible with both Faraday v1 and v2, look for awesome-faraday

Most of the middlewares are up for adoption, contributors that would like to maintain them. If you'd like to maintain any middleware, have any question or need any help, we're here! Please reach out opening an issue or a discussion.

Dependencies

Ruby >= 2.3.0

As of v0.16.0, faraday and faraday_middleware no longer officially support JRuby or Rubinius.

Some dependent libraries are needed only when using specific middleware:

Middleware Library Notes
FaradayMiddleware::Instrumentation activesupport
FaradayMiddleware::OAuth simple_oauth
FaradayMiddleware::ParseXml multi_xml
FaradayMiddleware::ParseYaml safe_yaml Not backwards compatible with versions of this middleware prior to faraday_middleware v0.12. See code comments for alternatives.
FaradayMiddleware::Mashify hashie
FaradayMiddleware::Rashify rash_alt Make sure to uninstall original rash gem to avoid conflict.

Examples

require 'faraday_middleware'

connection = Faraday.new 'http://example.com/api' do |conn|
  conn.request :oauth2, 'TOKEN'
  conn.request :json

  conn.response :xml,  content_type: /\bxml$/
  conn.response :json, content_type: /\bjson$/

  conn.use :instrumentation
  conn.adapter Faraday.default_adapter
end

最近版本更新:(数据更新于 2024-10-04 00:45:13)

2024-09-23 21:27:43 v1.2.1

2021-10-14 15:40:16 v1.2.0

2021-07-31 17:42:53 v1.1.0

2020-03-29 18:15:40 v1.0.0

2020-02-28 17:41:44 v1.0.0.rc1

2020-01-11 02:15:04 v0.14.0

2019-02-04 20:33:42 v0.13.1

2019-01-22 19:00:57 v0.13.0

2017-08-03 23:40:02 v0.12.2

2017-08-03 18:23:04 v0.12.1

lostisland/faraday_middleware同语言 Ruby最近更新仓库

2024-11-11 23:51:28 docusealco/docuseal

2024-10-25 21:50:52 maybe-finance/maybe

2024-10-15 12:03:41 capistrano/sshkit

2024-10-07 22:52:44 sous-chefs/postgresql

2024-10-06 00:01:30 rails/solid_queue

2024-09-26 23:26:21 dependabot/dependabot-core