Does anyone have any small example code on how to use http-a

Hi,

I’m trying to use the http-access2 gem to perform a basic set of login /
get
page operations on a website, from the point of view of checking site
performance. Since documentation of this library seems to be extremely
hard
to find, could someone who has used this library in the past please send
me
a basic ‘howto’ of the basic operations?

Precisely what I want to do is:

  1. Login to webpage (no https required) by sending username and password
    strings in a POST
  2. Get the body of the webpage that loads, also capturing the session
    cookie
    to keep the session alive between requests
  3. Send a post to the server that asks for the page to be updated
  4. Get the updated page
  5. Repeat steps 2, 3 and 4 multiple times
  6. Check out on an average how much time it takes for a single page
    reload.

I’d be really grateful if someone could point me along, since this
library
seems to have everything I need to get things working, except I can’t
find
out how :slight_smile:

Thanks a lot!

Kp.

On Jul 9, 2007, at 5:56 AM, Kp wrote:

  1. Check out on an average how much time it takes for a single page
    Kp.

http://codeforpeople.com/lib/ruby/rubyforge/rubyforge-0.1.1/bin/
rubyforge

it’s the very first and last parts of this program that are relevant.

regards.

-a

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Thanks for your interest to http-access2.

ara.t.howard wrote:

http://codeforpeople.com/lib/ruby/rubyforge/rubyforge-0.1.1/bin/rubyforge

I see the “hack to fix http-access2 cookie selection bug” part. I fixed
it in a later release. Please find how it should be.
http://dev.ctor.org/http-access2/browser/trunk/lib/http-access2/cookie.rb#L32

// NaHi

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)

iQEVAwUBRpNkPx9L2jg5EEGlAQL6DAf+OirUtm7XA9eZfV/nXRJnSc+U6v+MJTld
YlY8pOjJN99NsF8fuNdIpa+SzY1uQi6RCDj3IybsKgTjsCNa8aoZMZ9Ord7akVji
s+e7jGYMaKy4W8EBlT1rwXtHpHjH1Y2pG8oAoJjkHE8pbSzFbHAqGyjkB8T1s1EP
T9vrEapuZWMS9SnhRIiLpnPC8p2QiAsCyVpAmZoWzLAwkJ5O1ZzIq5rVDsw0OVq6
XbuDZi9G+0kEMEZP9hrjxOpfEWrZJyeNUwXVgy2HWvWp6tBZQOtK3Nm1SFsvVLbQ
HDDzcHBWGVSk8Ne839K0/5D1306t47bI68CxN8Oh3AmVQIukc+sQww==
=M4Pn
-----END PGP SIGNATURE-----

On 7/10/07, NAKAMURA, Hiroshi [email protected] wrote:

Hi,

Thanks for your interest to http-access2.

ara.t.howard wrote:

http://codeforpeople.com/lib/ruby/rubyforge/rubyforge-0.1.1/bin/rubyforge

I see the “hack to fix http-access2 cookie selection bug” part. I fixed
it in a later release. Please find how it should be.
http://dev.ctor.org/http-access2/browser/trunk/lib/http-access2/cookie.rb#L32

There’s a problem with the http-access2 gem docs - there’s a lot of
documentation that doesn’t seem to be extracted by rdoc. It shows up
in the comments when I read source, but not in the generated rdoc.

martin