> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/h/https/authenticated.md).

# Authenticated

```ruby
require('WWW::Mechanize')

var mech = %O<WWW::Mechanize>.new(
    cookie_jar => Hash(),
    agent => 'Mozilla/5.0',
    show_progress => 1,
)

mech.get('https://login.yahoo.com/')
mech.submit_form(
    form_id => 'mbr-login-form',   # form id
    fields => Hash(
        'login'  => 'XXXXXX',
        'passwd' => 'YYYYYY',
))
```
