HTTPCookieProcessor in ruby

D

Daniel Pereira

im a python developer, and i am starting learn ruby porting an previous
program i did, to interact with my ruby on rails application, but i
don't know how to develop this kind of behavior on ruby

self.o = urllib.request.build_opener(
urllib.request.HTTPCookieProcessor() )
urllib.request.install_opener( self.o )
p = urllib.parse.urlencode( { 'email': email, 'password': pw } )
f = self.o.open( site, p )

with self.o.open(site_link) as fd:
body = fd.read().decode("utf8")

any help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top