change directory structure

master
Kanezoh 2021-05-02 13:23:23 +09:00
parent 850a2c6d68
commit 303dac9795
3 changed files with 3 additions and 2 deletions

View File

@ -2,5 +2,5 @@ require "./src/mechanize.cr"
agent = Mechanize.new
agent.request_headers = HTTP::Headers{"Foo" => "Bar"}
page = agent.get("https://example.com")
page = agent.get("https://example.com/")
puts page

View File

@ -1,4 +1,4 @@
require "./http/agent"
require "./mechanize/http/agent"
class Mechanize
VERSION = "0.1.0"

View File

@ -12,6 +12,7 @@ module MechanizeCr
def fetch(uri, method = :get, headers = HTTP::Headers.new)
add_request_headers(headers)
response = http_request uri, method
puts response.not_nil!.body
end