K
Kleber A.
I created a ruby script to acess my website and check it's pages (and
keep it's cookie). It worked well until the moment I atived the apache
authorization on my server.
Now I don't know how to inform it's user and password in my script. Is
there any api for that ?
Here is my atual code (which works fine when there is no need of inform
user/pass)
@http = Net::HTTP.new(website)
resp, data = @http.request_get(path, {'User-Agent' => USERAGENT})
print resp.body #returns error 401 Authorization Required
@cookie = resp.response['set-cookie'].split('; ')[0] #hold the cookie
Thanks in advance,
Kleber
keep it's cookie). It worked well until the moment I atived the apache
authorization on my server.
Now I don't know how to inform it's user and password in my script. Is
there any api for that ?
Here is my atual code (which works fine when there is no need of inform
user/pass)
@http = Net::HTTP.new(website)
resp, data = @http.request_get(path, {'User-Agent' => USERAGENT})
print resp.body #returns error 401 Authorization Required
@cookie = resp.response['set-cookie'].split('; ')[0] #hold the cookie
Thanks in advance,
Kleber