Net:HTTP with authentification?

hey ,

below an example of a code

url = URI.parse(‘’)
req = Net::HTTP::
req.basic_auth ‘jack’, ‘pass’
req.set_form_data({‘from’=>‘2005-01-01’, ‘to’=>‘2005-03-31’}, ‘;’)
res =, url.port).start {|http| http.request(req)

i use this code to get a component of a local page (different
controller )

example : from home/index send a request to products/list

to send a request i need a password but i dont know how to get it ,
how to decrypt it

is there another way to loggin without login and password , with session
or cookies in the request header for exampe


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs