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/cookies.rb
  17. lib/httpx/plugins/cookies/cookie.rb
  18. lib/httpx/plugins/cookies/jar.rb
  19. lib/httpx/plugins/cookies/set_cookie_parser.rb
  20. lib/httpx/plugins/digest_auth.rb
  21. lib/httpx/plugins/expect.rb
  22. lib/httpx/plugins/follow_redirects.rb
  23. lib/httpx/plugins/grpc.rb
  24. lib/httpx/plugins/grpc/call.rb
  25. lib/httpx/plugins/grpc/message.rb
  26. lib/httpx/plugins/h2c.rb
  27. lib/httpx/plugins/internal_telemetry.rb
  28. lib/httpx/plugins/ntlm_auth.rb
  29. lib/httpx/plugins/oauth.rb
  30. lib/httpx/plugins/persistent.rb
  31. lib/httpx/plugins/proxy.rb
  32. lib/httpx/plugins/proxy/http.rb
  33. lib/httpx/plugins/proxy/socks4.rb
  34. lib/httpx/plugins/proxy/socks5.rb
  35. lib/httpx/plugins/proxy/ssh.rb
  36. lib/httpx/plugins/push_promise.rb
  37. lib/httpx/plugins/rate_limiter.rb
  38. lib/httpx/plugins/response_cache.rb
  39. lib/httpx/plugins/response_cache/store.rb
  40. lib/httpx/plugins/retries.rb
  41. lib/httpx/plugins/ssrf_filter.rb
  42. lib/httpx/plugins/stream.rb
  43. lib/httpx/plugins/upgrade.rb
  44. lib/httpx/plugins/upgrade/h2.rb
  45. lib/httpx/plugins/webdav.rb
  46. 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
38 def self.load_plugin(name)
39   h = @plugins
40   m = @plugins_mutex
41   unless (plugin = m.synchronize { h[name] })
42     require "httpx/plugins/#{name}"
43     raise "Plugin #{name} hasn't been registered" unless (plugin = m.synchronize { h[name] })
44   end
45   plugin
46 end
register_plugin(name, mod)

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

[show source]
   # File lib/httpx.rb
50 def self.register_plugin(name, mod)
51   h = @plugins
52   m = @plugins_mutex
53   m.synchronize { h[name] = mod }
54 end