W3cubDocs

/Crystal 0.31

class HTTP::Cookie

Overview

Represents a cookie with all its attributes. Provides convenient access and modification of them.

Defined in:

http/cookie.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, value : String, path : String = "/", expires : Time? = nil, domain : String? = nil, secure : Bool = false, http_only : Bool = false, samesite : SameSite? = nil, extension : String? = nil)Source

Instance Method Detail

def ==(other : self)

Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.

def domain : String?Source

def domain=(domain : String?)Source

def expired?Source

def expires : Time?Source

def expires=(expires : Time?)Source

def extension : String?Source

def extension=(extension : String?)Source

def hash(hasher)

Description copied from class Reference

See Object#hash(hasher)

def http_only : BoolSource

def http_only=(http_only : Bool)Source

def name : StringSource

def name=(name : String)Source

def path : StringSource

def path=(path : String)Source

def samesite : SameSite?Source

def samesite=(samesite : SameSite?)Source

def secure : BoolSource

def secure=(secure : Bool)Source

def to_cookie_header(io)Source

def to_cookie_headerSource

def to_set_cookie_headerSource

def value : StringSource

def value=(value : String)Source

© 2012–2019 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.31.1/HTTP/Cookie.html