【发布时间】:2014-12-30 06:24:16
【问题描述】:
我需要在发出以下请求时存储 cookie 值:-
http://www.google.com
并清除 cookie,然后通过发出新请求来创建 cookie
例子:-
我提出这个要求:-
http://www.google.com
示例 cookie 存储如下:-
Name: AID
Content: AJHaeXK3Vn1wJpwSo6hSbO9wWd_qlgczYqbEz-ushHQ
Domain: .google.com
Path: /ads
Send for: Any kind of connection
Accessible to script: No (HttpOnly)
Created: Wednesday, December 24, 2014 at 11:58:15 AM
Expires: Wednesday, June 15, 2016 at 12:30:00 PM
我想通过使用 rest-client 来获取上述详细信息。
我需要清除上面存储的cookie,然后发出新的请求。
【问题讨论】:
-
RestClient 不直接支持如此详细的 cookie 管理。改用机械化之类的东西。
标签: ruby cookies rest-client