Update README.md
This commit is contained in:
parent
655ef72770
commit
bcc012f763
18
README.md
18
README.md
@ -45,15 +45,6 @@ page = agent.post("http://example.com/", query: query)
|
|||||||
# => request body is foo=foo_value&bar=bar_value
|
# => request body is foo=foo_value&bar=bar_value
|
||||||
```
|
```
|
||||||
|
|
||||||
### search node
|
|
||||||
|
|
||||||
You can use css selector to search html nodes by using `#css` method.
|
|
||||||
This method is from [myhtml](https://github.com/sparklemotion/mechanize),so if you want to explore more, please refer the repository.
|
|
||||||
|
|
||||||
```crystal
|
|
||||||
puts page.css("h1").first.inner_text
|
|
||||||
```
|
|
||||||
|
|
||||||
### add query params, request_headers
|
### add query params, request_headers
|
||||||
|
|
||||||
You can add any query parameters and headers to requests.
|
You can add any query parameters and headers to requests.
|
||||||
@ -85,6 +76,15 @@ agent.submit(form)
|
|||||||
agent.get("#{web page only logged-in users can see}"
|
agent.get("#{web page only logged-in users can see}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### search node
|
||||||
|
|
||||||
|
You can use css selector to search html nodes by using `#css` method.
|
||||||
|
This method is from [myhtml](https://github.com/sparklemotion/mechanize), so if you want to explore more, please refer the repository.
|
||||||
|
|
||||||
|
```crystal
|
||||||
|
puts page.css("h1").first.inner_text
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. Fork it (<https://github.com/Kanezoh/mechanize.cr/fork>)
|
1. Fork it (<https://github.com/Kanezoh/mechanize.cr/fork>)
|
||||||
|
Loading…
Reference in New Issue
Block a user