Update README.md
This commit is contained in:
parent
e72fae8516
commit
be4d845921
16
README.md
16
README.md
@ -4,7 +4,8 @@
|
||||
|
||||
This project is inspired by Ruby's [mechanize](https://github.com/sparklemotion/mechanize).
|
||||
The purpose is to cover all the features of original one.
|
||||
Now, mechanize.cr can automatically store and send cookies, fill and submit forms.
|
||||
|
||||
[API Documentation](https://kanezoh.github.io/mechanize.cr/)
|
||||
|
||||
## Installation
|
||||
|
||||
@ -20,7 +21,7 @@ Now, mechanize.cr can automatically store and send cookies, fill and submit form
|
||||
|
||||
## Usage
|
||||
|
||||
### simple GET request
|
||||
### GET request
|
||||
|
||||
```crystal
|
||||
require "mechanize"
|
||||
@ -95,6 +96,17 @@ For activation, simply setup the log to `:debug` level
|
||||
Log.setup("mechanize", :debug)
|
||||
```
|
||||
|
||||
### Basic auth
|
||||
|
||||
You can access a page which is protected by basic auth, setting username and password for the url.
|
||||
|
||||
```crystal
|
||||
agent = Mechanize.new
|
||||
agent.add_auth("http://example.com", "username", "password")
|
||||
agent.get("http://example.com")
|
||||
```
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork it (<https://github.com/Kanezoh/mechanize.cr/fork>)
|
||||
|
Loading…
Reference in New Issue
Block a user