Sha256: 1ff0f08dd2966f199cece0a6a096982e80c0e75fa801df6e500450c60b441a62
Contents?: true
Size: 317 Bytes
Versions: 15
Compression:
Stored size: 317 Bytes
Contents
class OneCookieServlet < WEBrick::HTTPServlet::AbstractServlet def do_GET(req, res) cookie = WEBrick::Cookie.new("foo", "bar") cookie.path = "/" cookie.expires = Time.now + 86400 res.cookies << cookie res['Content-Type'] = "text/html" res.body = "<html><body>hello</body></html>" end end
Version data entries
15 entries across 15 versions & 2 rubygems