开发者

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

开发者 https://www.devze.com 2023-02-02 01:51 出处:网络
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.

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

精彩评论

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