@seahorse.client.option [String] :endpoint
The HTTP or HTTPS endpoint to send requests to. For example: 'http://example.com' 'https://example.com' 'http://example.com:123'
# File lib/seahorse/client/plugins/endpoint.rb, line 16 def add_handlers(handlers, config) handlers.add(Handler, priority: 90) end
# File lib/seahorse/client/plugins/endpoint.rb, line 20 def after_initialize(client) endpoint = client.config.endpoint if endpoint.nil? msg = "missing required option `:endpoint'" raise ArgumentError, msg end endpoint = URI.parse(endpoint.to_s) if URI::HTTPS === endpoint or URI::HTTP === endpoint client.config.endpoint = endpoint else msg = 'expected :endpoint to be a HTTP or HTTPS endpoint' raise ArgumentError, msg end end