Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request does not yield adapter client on v2.0.0.rc1 #68

Closed
rogerleite opened this issue Nov 26, 2012 · 2 comments
Closed

Request does not yield adapter client on v2.0.0.rc1 #68

rogerleite opened this issue Nov 26, 2012 · 2 comments
Milestone

Comments

@rogerleite
Copy link
Member

# using version 1.1.1
request = HTTPI::Request.new("http://google.com")
response = HTTPI.get(request, :curb)
puts response.code  # => 301

response = HTTPI.get(request, :curb) do |client|
  client.follow_location = true
end
puts response.code  # => 200

# using version 2.0.0.rc1
request = HTTPI::Request.new("http://google.com")
response = HTTPI.get(request, :curb)
puts response.code  # => 301

response = HTTPI.get(request, :curb) do |client|
  # this block is not called
  client.follow_location = true
end

# this works!
response = HTTPI.request(:get, request, :curb) do |client|
  client.follow_location = true
end
puts response.code  # => 200

I can work on this. Ok?

Roger Leite

@rubiii
Copy link
Contributor

rubiii commented Nov 27, 2012

thanks for reporting this. keep me posted.

@rogerleite
Copy link
Member Author

Just to record, this bug was found in issue #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants