开发者

ruby - get cookie from response when there are two or more set-cookie headers

This is just pure ruby not rail.

I'm trying to code an auto login form to change some configurations o开发者_Python百科f my web hosting panel. There are two and more cookies returned.

I wish to get ruby version of this post How to handle multiple Set-Cookie header in HTTP response

open-uri also takes the last set-cookie header.

h1 = open("http://www.w3.org/") h1.meta['set-cookie']


get_fields() solves this problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜