class LHC::Request
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/lhc/concerns/lhc/request/user_agent_concern.rbs class LHC::Request def create_request: () -> Typhoeus::Request def encode_url: (String url) -> String def format!: (Hash options) -> Hash def generate_url_from_template!: () -> Hash def initialize: (Hash options, ?true self_executing) -> void def on_complete: (Typhoeus::Response response) -> nil def optionally_encoded_url: (Hash options) -> String def run!: () -> Typhoeus::Response def translate_body: (Hash options) -> Hash def typhoeusize: (Hash options) -> Hash def use_configured_endpoint!: () -> nil end
def create_request
Experimental RBS support (using type sampling data from the type_fusion
project).
def create_request: () -> Typhoeus::Request
This signature was generated using 36 samples from 2 applications.
def create_request request = Typhoeus::Request.new( optionally_encoded_url(options), translate_body(typhoeusize(options)) ) request.on_headers do interceptors.intercept(:after_request) interceptors.intercept(:before_response) end request.on_complete { |response| on_complete(response) } request end
def encode_url(url)
Experimental RBS support (using type sampling data from the type_fusion
project).
def encode_url: (String url) -> String
This signature was generated using 36 samples from 4 applications.
def encode_url(url) return url if url.nil? Addressable::URI.escape(url) end
def error
def error @error ||= LHC::Error.find(response) end
def error_ignored?
def error_ignored? ignore_error? end
def format!(options)
Experimental RBS support (using type sampling data from the type_fusion
project).
type LHC__Request_format!_options = body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | Array | String | Array | Array | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | Array | String | Array | | Array | String | String | Array | String | String | Array | String | String | Array | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | String | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | Array | | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | Array | String | Array | Array | String | Array | | String | String | String | Array | String | Array | Array | String | Array | Array | String | Array | | Array | String | Array | Array | String | Array | | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | NilClass | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | Array | | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | Array | String | Array | | String | String | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String def format!: (LHC__Request_format!_options options) -> body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String
This signature was generated using 40 samples from 5 applications.
def format!(options) self.format = options.delete(:format) || LHC::Formats::JSON.new format.format_options(options) end
def generate_url_from_template!
Experimental RBS support (using type sampling data from the type_fusion
project).
def generate_url_from_template!: () ->
This signature was generated using 38 samples from 2 applications.
def generate_url_from_template! endpoint = LHC::Endpoint.new(options[:url]) params = if format && options[:body].present? && options[:body].respond_to?(:as_json) && options[:body].as_json.is_a?(Hash) options[:body].as_json.merge(options[:params] || {}).deep_symbolize_keys else options[:params] end options[:url] = endpoint.compile(params) endpoint.remove_interpolated_params!(options[:params]) end
def handle_error(response)
def handle_error(response) return if ignore_error? throw_error(response) unless error_handler response.body_replacement = error_handler.call(response) end
def headers
def headers raw.options.fetch(:headers, nil) || raw.options[:headers] = {} end
def ignore_error?
def ignore_error? @ignore_error ||= begin errors_ignored.detect do |ignored_error| error <= ignored_error end.present? end end
def initialize(options, self_executing = true)
Experimental RBS support (using type sampling data from the type_fusion
project).
type LHC__Request_initialize_options = body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | String | String | return_value | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | return_value | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | | Array | String | String | String | Array | String | String | String | return_value | Array | | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | Array | | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | Array | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | Array | | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | Array | | Array | String | Array | Array | String | Array | | Array | String | Array | | Array | String | Array | | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | NilClass | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | url | String | method | Symbol | format | LHC::Formats::JSON | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | Array | String | Array | | String | String | String | String | url | String | method | Symbol | format | LHC::Formats::JSON def initialize: (LHC__Request_initialize_options options, ?true self_executing) -> void
This signature was generated using 41 samples from 3 applications.
def initialize(options, self_executing = true) self.errors_ignored = (options.fetch(:ignore, []) || []).to_a.compact self.source = options&.dig(:source) self.options = format!(options.deep_dup || {}) self.error_handler = options.delete :rescue use_configured_endpoint! generate_url_from_template! self.interceptors = LHC::Interceptors.new(self) interceptors.intercept(:before_raw_request) self.raw = create_request interceptors.intercept(:before_request) if self_executing && !response run! elsif response on_complete(response) end end
def method
def method (raw.options[:method] || options[:method] || :get).to_sym end
def on_complete(response)
Experimental RBS support (using type sampling data from the type_fusion
project).
def on_complete: (Typhoeus::Response response) -> nil
This signature was generated using 35 samples from 2 applications.
def on_complete(response) self.response = response.is_a?(LHC::Response) ? response : LHC::Response.new(response, self) interceptors.intercept(:after_response) handle_error(self.response) unless self.response.success? end
def optionally_encoded_url(options)
Experimental RBS support (using type sampling data from the type_fusion
project).
type LHC__Request_optionally_encoded_url_options = body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | Array | String | Array | String | Array | String | Array | String | Array | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | Array | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | Array | String | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | Array | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | Array | String | Array | | String | String | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | NilClass | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String def optionally_encoded_url: (LHC__Request_optionally_encoded_url_options options) -> String
This signature was generated using 32 samples from 2 applications.
def optionally_encoded_url(options) return options[:url] unless options.fetch(:url_encoding, true) encode_url(options[:url]) end
def params
def params raw.options.fetch(:params, nil) || raw.options[:params] = {} end
def run!
Experimental RBS support (using type sampling data from the type_fusion
project).
def run!: () -> Typhoeus::Response
This signature was generated using 49 samples from 2 applications.
def run! raw.run end
def scrubbed_headers
def scrubbed_headers LHC::HeadersScrubber.new(headers.deep_dup, options[:auth]).scrubbed end
def scrubbed_options
def scrubbed_options scrubbed_options = options.deep_dup scrubbed_options[:cache] = LHC::CacheScrubber.new(scrubbed_options[:cache]).scrubbed scrubbed_options[:params] = LHC::ParamsScrubber.new(scrubbed_options[:params]).scrubbed scrubbed_options[:headers] = LHC::HeadersScrubber.new(scrubbed_options[:headers], scrubbed_options[:auth]).scrubbed scrubbed_options[:auth] = LHC::AuthScrubber.new(scrubbed_options[:auth]).scrubbed scrubbed_options[:body] = LHC::BodyScrubber.new(scrubbed_options[:body]).scrubbed scrubbed_options end
def scrubbed_params
def scrubbed_params LHC::ParamsScrubber.new(params.deep_dup).scrubbed end
def throw_error(response)
def throw_error(response) raise error.new(error, response) end
def translate_body(options)
Experimental RBS support (using type sampling data from the type_fusion
project).
def translate_body: ((body | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String) options) -> body | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String
This signature was generated using 43 samples from 3 applications.
def translate_body(options) return options if options.fetch(:body, nil).blank? options[:body] = format.to_body(options[:body]) options end
def typhoeusize(options)
Experimental RBS support (using type sampling data from the type_fusion
project).
type LHC__Request_typhoeusize_options = body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | Array | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | Array | String | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | url | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | NilClass | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | Array | String | Array | String | Array | Array | String | String | Array | String | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | | return_value | Array | String | Array | String | Array | | String | String | String | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String def typhoeusize: (LHC__Request_typhoeusize_options options) -> (body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String | body | sample | gem_name | String | gem_version | String | receiver | String | method_name | String | application_name | String | location | String | type_fusion_version | String | parameters | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | Array | String | String | String | return_value | String | method | Symbol | headers | Content-Type | String | Accept | String | Accept-Charset | String)
This signature was generated using 33 samples from 3 applications.
def typhoeusize(options) options = options.deep_dup easy = Ethon::Easy.new options.delete(:url) options.each do |key, _v| next if TYPHOEUS_OPTIONS.include? key method = "#{key}=" options.delete key unless easy.respond_to?(method) end options end
def url
def url raw.base_url || options[:url] end
def use_configured_endpoint!
Experimental RBS support (using type sampling data from the type_fusion
project).
def use_configured_endpoint!: () -> nil
This signature was generated using 34 samples from 2 applications.
Get configured endpoint and use it for doing the request.
def use_configured_endpoint! endpoint = LHC.config.endpoints[options[:url]] return unless endpoint # explicit options override endpoint options new_options = endpoint.options.deep_merge(options) # set new options self.options = new_options options[:url] = endpoint.url end