开发者

In Mechanize what is the cookiejar and how does it differ from cookies?

开发者 https://www.devze.com 2022-12-25 18:55 出处:网络
开发者_如何转开发How does Mechanize::CookieJar differ from the Mechanize::Cookies array? There must be some difference but after poking around for a little bit I can\'t seem to find a good explanation
开发者_如何转开发

How does Mechanize::CookieJar differ from the Mechanize::Cookies array? There must be some difference but after poking around for a little bit I can't seem to find a good explanation?


It seems from the official documentation that the CookieJar and cookies are very similar indeed:

# File lib/mechanize.rb, line 208
def cookies
  @cookie_jar.to_a
end

Usually, a Cookie Jar has also the interesting ability to be saved on disk and reloaded later on (see the save_as and load method on the Cookie Jar).

0

精彩评论

暂无评论...
验证码 换一张
取 消