作者:小呗羽_331 | 来源:互联网 | 2023-09-25 19:59
SoIjutcreatedacontrollerlikethis:我创建了这样的控制器requirenethttpclassHowdyController<A
So I jut created a controller like this:
我创建了这样的控制器
require 'net/http'
class HowdyController
and my route is like this:
我的路线是这样的:
get "howdy/show"
and my view is lie this:
我的观点是这样的
Howdy#show
<%= "The call to example.com returned this: #{@resp}" %>
But when I go to http://localhost:3000/howdy/show
I get this error
但是当我转到http://localhost:3000/howdy/show时,我得到了这个错误
HTTP request path is empty
HTTP请求路径为空
I am totally new to Net::HTTP and just trying to create something simple that works!
我对Net是全新的::HTTP,并尝试创建一些简单的东西来工作!
2 个解决方案