The goal of this task is to demonstrate HTTPS requests with authentication.
Implementations of this task should not use client certificates for this: that is the subject of another task.

require('WWW::Mechanize')
 
var mech = %s'WWW::Mechanize'.new(
    cookie_jar => Hash.new,
    agent => 'Mozilla/5.0',
)
 
mech.get('https://login.yahoo.com/')
mech.submit_form(
    form_id => 'mbr-login-form',   # form id
    fields => Hash.new(
        'login'  => 'XXXXXX',
        'passwd' => 'YYYYYY',
))