How to implement cookie support in ruby net/http?

后端 未结 6 1044
闹比i
闹比i 2020-12-07 10:43

I\'d like to add cookie support to a ruby class utilizing net/http to browse the web. Cookies have to be stored in a file to survive after the script has ended. Of course I

6条回答
  •  Happy的楠姐
    2020-12-07 10:57

    I've used Curb and Mechanize for a similar project. Just enable cookies support and save the cookies to a temp cookiejar... If your using net/http or packages without cookie support built in, you will need to write your own cookie handling.

提交回复
热议问题