add Mechanize class comment
parent
ff6b9d0d94
commit
949e0234df
|
@ -4,6 +4,28 @@ require "./mechanize/node"
|
||||||
require "./mechanize/page"
|
require "./mechanize/page"
|
||||||
require "./mechanize/errors/*"
|
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
|
class Mechanize
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.1.0"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue