add Mechanize class comment
This commit is contained in:
parent
ff6b9d0d94
commit
949e0234df
@ -4,6 +4,28 @@ require "./mechanize/node"
|
||||
require "./mechanize/page"
|
||||
require "./mechanize/errors/*"
|
||||
|
||||
# This class is main class of Mechanize.cr,
|
||||
# using this class' instance to start web interaction.
|
||||
#
|
||||
# now only supports GET, POST. other HTTP methods will be implemented soon...
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# ```
|
||||
# # GET
|
||||
# agent = Mechanize.new
|
||||
# agent.get("http://example.com",
|
||||
# params: {"foo" => "bar"},
|
||||
# headers: HTTP::Headers{"Foo" => "Bar"})
|
||||
# ```
|
||||
#
|
||||
# ```
|
||||
# # POST
|
||||
# # sending post request whose post body is "foo=bar"
|
||||
# agent = Mechanize.new
|
||||
# agent.post("http://example.com",
|
||||
# query: {"foo" => "bar"})
|
||||
# ```
|
||||
class Mechanize
|
||||
VERSION = "0.1.0"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user