Update README.md

master
Kanezoh 2021-06-02 14:46:26 +09:00 committed by GitHub
parent 655ef72770
commit bcc012f763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -45,15 +45,6 @@ page = agent.post("http://example.com/", query: query)
# => 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
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}"
```
### 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
1. Fork it (<https://github.com/Kanezoh/mechanize.cr/fork>)