Sha256: ae2c3e2e35cf0223b2cfa524c3f00c716ab9cae863010648caecb87af25bc7ab

Contents?: true

Size: 1.19 KB

Versions: 2

Compression:

Stored size: 1.19 KB

Contents

module HTTPX
  class HTTPProxyError < Error
  end

  module Plugins
    module Proxy
      Error: singleton(HTTPProxyError)
      PROXY_ERRORS: Array[singleton(StandardError)]

      class Parameters
        attr_reader uri: URI::Generic
        attr_reader username: string?
        attr_reader password: string?

        def authenticated?: () -> boolish
        def token_authentication: () -> String?

        def ==: (untyped) -> bool

        private

        def initialize: (uri: generic_uri, ?username: string, ?password: string) -> untyped
      end

      def self.configure: (singleton(Session)) -> void

      type proxyParam = Parameters | Hash[Symbol, untyped]

      interface _ProxyOptions
        def proxy: () -> proxyParam?
      end

      def self.extra_options: (Options) -> (Options & _ProxyOptions)

      module InstanceMethods
        private

        def proxy_uris: (uri, Options & _ProxyOptions) -> { uri: (URI | string), username: string, password: string }
                      | (uri, Options & _ProxyOptions) -> { uri: (URI | string) }
                      | (uri, Options & _ProxyOptions) -> nil
      end
    end

    type sessionProxy = Session & Proxy::InstanceMethods
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
httpx-0.16.1 sig/plugins/proxy.rbs
httpx-0.16.0 sig/plugins/proxy.rbs