Class: LoginPage
- Inherits:
-
ServiceCall
- Object
- ServiceCall
- LoginPage
- Defined in:
- lib/etvnet_seek/core/login_page.rb
Constant Summary collapse
Instance Attribute Summary
Attributes inherited from ServiceCall
Instance Method Summary collapse
-
#initialize ⇒ LoginPage
constructor
A new instance of LoginPage.
- #login(username, password) ⇒ Object
Methods inherited from ServiceCall
Constructor Details
Instance Method Details
#login(username, password) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/etvnet_seek/core/login_page.rb', line 12 def login username, password headers = { "Content-Type" => "application/x-www-form-urlencoded" } response = post({ 'action' => '/login/', 'username' => username, 'password'=> password }, headers) = response.response['set-cookie'] # p cookie # unless cookie.nil? # cookie = cleanup_cookie(cookie) # end #[0..cookie.index(";")-1] end |