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

grape urls should not depend on trailing slashes #28

Open
robertkowalski opened this issue Jun 21, 2017 · 0 comments
Open

grape urls should not depend on trailing slashes #28

robertkowalski opened this issue Jun 21, 2017 · 0 comments

Comments

@robertkowalski
Copy link
Contributor

grape_address should work, even if no trailing slash is added.

require_relative '../lib/grenache-ruby-http.rb'


# note the missing trailing slash
c = Grenache::Http.new grape_address: "http://127.0.0.1:40002"

start_time = Time.now

10.times do |n|
  err,resp = c.request("rpc_test","world #{n}")
  if !err
    puts "response: #{resp}"
  else
    puts err
  end
end

puts "Total Time: #{Time.now - start_time}"

results in:

bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
bad URI(is not URI?): http://127.0.0.1:40001lookup
Total Time: 0.003347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant