# Https authentication & storing https page in string

**URL:** <https://www.ruby-forum.com/t/https-authentication-storing-https-page-in-string/114992>\
**Category:** Ruby\
**Created:** [September 19, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/https-authentication-storing-https-page-in-string/114992 "2007-09-19T15:50:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhanukanaveen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/90ced4/32.png) [@dhanukanaveen](https://www.ruby-forum.com/u/dhanukanaveen)\
**Post date:** [September 19, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/https-authentication-storing-https-page-in-string/114992/1 "2007-09-19T15:50:20Z")

</div>

Hi,

I have to write a ruby script which will give me the dynamic page on a  
https as a string.

First I have to login in the https page.  
I am doing this using WATIR.  
Then I want the dynamic page to be stored in a string str.

I am able to do the https login using WATIR.  
But when I try to get the dynamic page using HPRICOT, I am still  
getting the old https login page.

Kindly suggest what to do.

Regards,  
ND

---

<div class="post-metadata">

**Author:** ![dhanukanaveen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/90ced4/32.png) [@dhanukanaveen](https://www.ruby-forum.com/u/dhanukanaveen)\
**Post date:** [September 19, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/https-authentication-storing-https-page-in-string/114992/2 "2007-09-19T15:54:20Z")

</div>

I forgot to say that the URL of the dynamic page is static.  
It doesnot change.  
But it seeks the authenticated session to be there to show the dynamic  
content.

Regards,  
Naveen D.

On 9/19/07, Naveen D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am able to do the https login using WATIR.  
> But when I try to get the dynamic page using HPRICOT, I am still  
> getting the old https login page.
> 
> Kindly suggest what to do.
> 
> Regards,  
> ND

–  
Naveen D.

```auto
Blog: http://www.dhanukanaveen.com

```

Gtalk: dhanukanaveen  
Yahoo: dhanukanaveen  
Skype: dhanukanaveen  
MSN: dhanukanaveen

```auto

```

---

<div class="post-metadata">

**Author:** ![dhanukanaveen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/90ced4/32.png) [@dhanukanaveen](https://www.ruby-forum.com/u/dhanukanaveen)\
**Post date:** [September 19, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/https-authentication-storing-https-page-in-string/114992/3 "2007-09-19T16:06:24Z")

</div>

> First I have to login in the https page.  
> I am doing this using WATIR.  
> Then I want the dynamic page to be stored in a string str.
> 
> I am able to do the https login using WATIR.  
> But when I try to get the dynamic page using HPRICOT, I am still  
> getting the old https login page.
> 
> Kindly suggest what to do.

Either do the authorization via Ruby Net::HTTP, or use the cookie the  
site  
sets for authentication, or use WATIR to save the page, and load the  
saved  
page.
