So I jut created a controller like this:
require 'net/http'
class HowdyController < ApplicationController
def show
url = URI.parse("http://google.com")
req = Net::HTTP::Get.new(url.path)
@resp = Net::HTTP.new(url.host, url.port).start {|http| http.request(req)}
end
end
and my route is like this:
get "howdy/show"
and my view is lie this:
<h1>Howdy#show</h1>
<%= "The call to example.com returned this: #{@resp}" %>
But when I go to http://localhost:3000/howdy/show
I get this error
HTTP request path is empty
I am totally new to Net::HTTP and just trying to create something simple that works!