Name

CGI::Cookie — HTTP cookie class

Synopsis

CGI::Cookie represents the HTTP cookie that carries information between HTTP sessions.

Required Library

require ‘cgi’

Object Attributes

The CGI::Cookie class has the following accessors:

c.name

Cookie name

c.value

An array of cookie values

c.path

The cookie’s path

c.domain

The domain

c.expires

The expiration time (as a Time object)

c.secure

True if secure cookie

Get Ruby in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.