Module: HTTPX::Plugins
- Defined in:
- lib/httpx.rb,
lib/httpx/plugins/h2c.rb,
lib/httpx/plugins/xml.rb,
lib/httpx/plugins/auth.rb,
lib/httpx/plugins/grpc.rb,
lib/httpx/plugins/cache.rb,
lib/httpx/plugins/oauth.rb,
lib/httpx/plugins/proxy.rb,
lib/httpx/plugins/query.rb,
lib/httpx/plugins/brotli.rb,
lib/httpx/plugins/expect.rb,
lib/httpx/plugins/stream.rb,
lib/httpx/plugins/webdav.rb,
lib/httpx/adapters/sentry.rb,
lib/httpx/plugins/cookies.rb,
lib/httpx/plugins/retries.rb,
lib/httpx/plugins/tracing.rb,
lib/httpx/plugins/upgrade.rb,
lib/httpx/plugins/auth/ntlm.rb,
lib/httpx/plugins/aws_sigv4.rb,
lib/httpx/plugins/callbacks.rb,
lib/httpx/plugins/grpc/call.rb,
lib/httpx/plugins/ntlm_auth.rb,
lib/httpx/plugins/proxy/ssh.rb,
lib/httpx/plugins/auth/basic.rb,
lib/httpx/plugins/basic_auth.rb,
lib/httpx/plugins/persistent.rb,
lib/httpx/plugins/proxy/http.rb,
lib/httpx/plugins/upgrade/h2.rb,
lib/httpx/plugins/auth/digest.rb,
lib/httpx/plugins/auth/socks5.rb,
lib/httpx/plugins/cache/store.rb,
lib/httpx/plugins/digest_auth.rb,
lib/httpx/plugins/ssrf_filter.rb,
lib/httpx/plugins/stream_bidi.rb,
lib/httpx/plugins/grpc/message.rb,
lib/httpx/plugins/ntlm_v2_auth.rb,
lib/httpx/plugins/proxy/socks4.rb,
lib/httpx/plugins/proxy/socks5.rb,
lib/httpx/plugins/push_promise.rb,
lib/httpx/plugins/rate_limiter.rb,
lib/httpx/plugins/content_digest.rb,
lib/httpx/plugins/response_cache.rb,
lib/httpx/plugins/circuit_breaker.rb,
lib/httpx/plugins/cache/file_store.rb,
lib/httpx/plugins/follow_redirects.rb,
lib/httpx/plugins/fiber_concurrency.rb,
lib/httpx/plugins/internal_telemetry.rb,
lib/httpx/plugins/server_sent_events.rb,
lib/httpx/plugins/aws_sdk_authentication.rb,
sig/httpx.rbs,
sig/plugins/h2c.rbs,
sig/plugins/xml.rbs,
sig/plugins/auth.rbs,
sig/plugins/grpc.rbs,
sig/plugins/cache.rbs,
sig/plugins/oauth.rbs,
sig/plugins/proxy.rbs,
sig/plugins/query.rbs,
sig/plugins/brotli.rbs,
sig/plugins/expect.rbs,
sig/plugins/stream.rbs,
sig/plugins/webdav.rbs,
sig/plugins/cookies.rbs,
sig/plugins/retries.rbs,
sig/plugins/tracing.rbs,
sig/plugins/upgrade.rbs,
sig/plugins/auth/ntlm.rbs,
sig/plugins/aws_sigv4.rbs,
sig/plugins/callbacks.rbs,
sig/plugins/grpc/call.rbs,
sig/plugins/ntlm_auth.rbs,
sig/plugins/proxy/ssh.rbs,
sig/plugins/auth/basic.rbs,
sig/plugins/basic_auth.rbs,
sig/plugins/persistent.rbs,
sig/plugins/proxy/http.rbs,
sig/plugins/upgrade/h2.rbs,
sig/plugins/auth/digest.rbs,
sig/plugins/auth/socks5.rbs,
sig/plugins/cache/store.rbs,
sig/plugins/compression.rbs,
sig/plugins/cookies/jar.rbs,
sig/plugins/digest_auth.rbs,
sig/plugins/ssrf_filter.rbs,
sig/plugins/stream_bidi.rbs,
sig/plugins/grpc/message.rbs,
sig/plugins/ntlm_v2_auth.rbs,
sig/plugins/proxy/socks4.rbs,
sig/plugins/proxy/socks5.rbs,
sig/plugins/push_promise.rbs,
sig/plugins/rate_limiter.rbs,
sig/plugins/content_digest.rbs,
sig/plugins/cookies/cookie.rbs,
sig/plugins/response_cache.rbs,
sig/plugins/circuit_breaker.rbs,
sig/plugins/cache/file_store.rbs,
sig/plugins/follow_redirects.rbs,
sig/plugins/fiber_concurrency.rbs,
sig/plugins/server_sent_events.rbs,
sig/plugins/aws_sdk_authentication.rbs,
sig/plugins/cookies/set_cookie_parser.rbs
Overview
All plugins should be stored under this module/namespace. Can register and load plugins.
Defined Under Namespace
Modules: AWSSigV4, Auth, Authentication, AwsSdkAuthentication, BasicAuth, Brotli, Cache, Callbacks, CircuitBreaker, Compression, ContentDigest, Cookies, DigestAuth, Expect, FiberConcurrency, FollowRedirects, GRPC, H2, H2C, InternalTelemetry, NTLMAuth, NTLMV2Auth, NtlmV2Auth, OAuth, Persistent, Proxy, PushPromise, Query, RateLimiter, ResponseCache, Retries, Sentry, ServerSentEvents, SetCookieParser, SsrfFilter, Stream, StreamBidi, Tracing, Upgrade, WebDav, XML, _Authenticator, _SigV4Credentials Classes: Cookie, Jar
Class Method Summary collapse
-
.load_plugin(name) ⇒ Object
Loads a plugin based on a name.
-
.register_plugin(name, mod) ⇒ Object
Registers a plugin (+mod+) in the central store indexed by
name.
Instance Method Summary collapse
Class Method Details
.load_plugin(name) ⇒ Object
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.
21 22 23 24 25 26 27 28 29 |
# File 'lib/httpx.rb', line 21 def self.load_plugin(name) h = @plugins m = @plugins_mutex unless (plugin = m.synchronize { h[name] }) require "httpx/plugins/#{name}" raise "Plugin #{name} hasn't been registered" unless (plugin = m.synchronize { h[name] }) end plugin end |
.register_plugin(name, mod) ⇒ Object
Registers a plugin (+mod+) in the central store indexed by name.
33 34 35 36 37 |
# File 'lib/httpx.rb', line 33 def self.register_plugin(name, mod) h = @plugins m = @plugins_mutex m.synchronize { h[name] = mod } end |
Instance Method Details
#self?.load_plugin ⇒ Module
25 |
# File 'sig/httpx.rbs', line 25
def self?.load_plugin: (Symbol name) -> Module
|
#self?.register_plugin ⇒ void
This method returns an undefined value.
27 |
# File 'sig/httpx.rbs', line 27
def self?.register_plugin: (Symbol, Module) -> void
|