RestClient and passing cookies

Hello,

I had this post on the Ruby channel, but maybe I have more luck here :slight_smile:

I'm struggling with the last piece of the puzzle here. Basically I want to reuse a cookie that I capture from a previous RestClient.post() login, the only problem is that the second RestClient.post will not accept it. I have tried different methods to pass the cookie value to the RestClient.post(), but with no success. Also tried the base64 encoding, also failed here. Can someone please advice?

Code:

You need to set a header of the form

Cookie: cookie_name=cookie_value; other_cookie_name=cookie_value

if your name/value have special characters in them you’ll need to quote them.

Fred

Hello Fred,

Thanks for your reply! But the problem was that the cookie was expired before I could reuse it.

Cheers,

iLias