Sha256: dcb16e04ee906687ace6dcef22efa9beb0cf008432e46bb4398706c52ff26184

Contents?: true

Size: 1.4 KB

Versions: 13

Compression:

Stored size: 1.4 KB

Contents

When /^I set my HTTParty timeout option to (\d+)$/ do |timeout|
  @request_options[:timeout] = timeout.to_i
end

When /^I set my HTTParty open_timeout option to (\d+)$/ do |timeout|
  @request_options[:open_timeout] = timeout.to_i
end

When /^I set my HTTParty read_timeout option to (\d+)$/ do |timeout|
  @request_options[:read_timeout] = timeout.to_i
end

When /I call HTTParty#get with '(.*)'$/ do |url|
  begin
    @response_from_httparty = HTTParty.get("http://#{@host_and_port}#{url}", @request_options)
  rescue HTTParty::RedirectionTooDeep, Timeout::Error => e
    @exception_from_httparty = e
  end
end

When /^I call HTTParty#head with '(.*)'$/ do |url|
  begin
    @response_from_httparty = HTTParty.head("http://#{@host_and_port}#{url}", @request_options)
  rescue HTTParty::RedirectionTooDeep, Timeout::Error => e
    @exception_from_httparty = e
  end
end

When /I call HTTParty#get with '(.*)' and a basic_auth hash:/ do |url, auth_table|
  h = auth_table.hashes.first
  @response_from_httparty = HTTParty.get(
    "http://#{@host_and_port}#{url}",
    :basic_auth => { :username => h["username"], :password => h["password"] }
  )
end

When /I call HTTParty#get with '(.*)' and a digest_auth hash:/ do |url, auth_table|
  h = auth_table.hashes.first
  @response_from_httparty = HTTParty.get(
    "http://#{@host_and_port}#{url}",
    :digest_auth => { :username => h["username"], :password => h["password"] }
  )
end

Version data entries

13 entries across 12 versions & 4 rubygems

Version Path
alloy_sdk-0.1.0 vendor/bundle/ruby/3.0.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
alloy_sdk-0.1.0 vendor/bundle/ruby/2.6.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.9 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.8 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.7 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.6 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.5 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.4 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.3 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.2 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
allegro_api_client-0.0.1 gems/ruby/2.1.0/gems/httparty-0.13.1/features/steps/httparty_steps.rb
httparty-0.13.1 features/steps/httparty_steps.rb