From: "ara.t.howard" Date: 2007-07-09T23:43:14+09:00 Subject: Re: Does anyone have any small example code on how to use http-acces2? On Jul 9, 2007, at 5:56 AM, Kp wrote: > 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 :) > > Thanks a lot! > > 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 -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama