module HTTPX::Plugins

  1. lib/httpx.rb
  2. lib/httpx/adapters/sentry.rb
  3. lib/httpx/plugins/auth.rb
  4. lib/httpx/plugins/auth/basic.rb
  5. lib/httpx/plugins/auth/digest.rb
  6. lib/httpx/plugins/auth/ntlm.rb
  7. lib/httpx/plugins/auth/socks5.rb
  8. lib/httpx/plugins/aws_sdk_authentication.rb
  9. lib/httpx/plugins/aws_sigv4.rb
  10. lib/httpx/plugins/basic_auth.rb
  11. lib/httpx/plugins/brotli.rb
  12. lib/httpx/plugins/callbacks.rb
  13. lib/httpx/plugins/circuit_breaker.rb
  14. lib/httpx/plugins/circuit_breaker/circuit.rb
  15. lib/httpx/plugins/circuit_breaker/circuit_store.rb
  16. lib/httpx/plugins/content_digest.rb
  17. lib/httpx/plugins/cookies.rb
  18. lib/httpx/plugins/cookies/cookie.rb
  19. lib/httpx/plugins/cookies/jar.rb
  20. lib/httpx/plugins/cookies/set_cookie_parser.rb
  21. lib/httpx/plugins/digest_auth.rb
  22. lib/httpx/plugins/expect.rb
  23. lib/httpx/plugins/follow_redirects.rb
  24. lib/httpx/plugins/grpc.rb
  25. lib/httpx/plugins/grpc/call.rb
  26. lib/httpx/plugins/grpc/message.rb
  27. lib/httpx/plugins/h2c.rb
  28. lib/httpx/plugins/internal_telemetry.rb
  29. lib/httpx/plugins/ntlm_auth.rb
  30. lib/httpx/plugins/oauth.rb
  31. lib/httpx/plugins/persistent.rb
  32. lib/httpx/plugins/proxy.rb
  33. lib/httpx/plugins/proxy/http.rb
  34. lib/httpx/plugins/proxy/socks4.rb
  35. lib/httpx/plugins/proxy/socks5.rb
  36. lib/httpx/plugins/proxy/ssh.rb
  37. lib/httpx/plugins/push_promise.rb
  38. lib/httpx/plugins/rate_limiter.rb
  39. lib/httpx/plugins/response_cache.rb
  40. lib/httpx/plugins/response_cache/store.rb
  41. lib/httpx/plugins/retries.rb
  42. lib/httpx/plugins/ssrf_filter.rb
  43. lib/httpx/plugins/stream.rb
  44. lib/httpx/plugins/upgrade.rb
  45. lib/httpx/plugins/upgrade/h2.rb
  46. lib/httpx/plugins/webdav.rb
  47. lib/httpx/plugins/xml.rb
  48. lib/httpx/response.rb
  49. show all

All plugins should be stored under this module/namespace. Can register and load plugins.

Methods

Public Class

  1. load_plugin
  2. register_plugin

Public Class methods

load_plugin(name)

Loads a plugin based on a name. If the plugin hasn’t been loaded, tries to load it from the load path under “httpx/plugins/” directory.

[show source]
   # File lib/httpx.rb
21 def self.load_plugin(name)
22   h = @plugins
23   m = @plugins_mutex
24   unless (plugin = m.synchronize { h[name] })
25     require "httpx/plugins/#{name}"
26     raise "Plugin #{name} hasn't been registered" unless (plugin = m.synchronize { h[name] })
27   end
28   plugin
29 end
register_plugin(name, mod)

Registers a plugin (mod) in the central store indexed by name.

[show source]
   # File lib/httpx.rb
33 def self.register_plugin(name, mod)
34   h = @plugins
35   m = @plugins_mutex
36   m.synchronize { h[name] = mod }
37 end