Tornado 6.5 Documentationto http.cookies.Morsel directly. See https://developer.mozilla.org/ en-US/docs/Web/HTTP/Headers/Set-Cookie for more information. expires may be a numeric timestamp as returned by time.time, a time tuple 93Tornado Documentation, Release 6.5.1 >>> h.add("Set-Cookie", "A=B") >>> h.add("Set-Cookie", "C=D") >>> h["set-cookie"] 'A=B,C=D' >>> h.get_list("set-cookie") ['A=B', 'C=D'] >>> for (k,v) in sorted(h.get_all()): get_all()): ... print('%s: %s' % (k,v)) ... Content-Type: text/html Set-Cookie: A=B Set-Cookie: C=D add(name: str, value: str, *, _chars_are_bytes: bool = True) → None Adds a new value for the given key0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.5 Documentationhtml#http.cookies.Morsel] directly. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie for more information. expires may be a numeric timestamp as returned by time.time [https://docs h["Content-Type"] 'text/html' >>> h.add("Set-Cookie", "A=B") >>> h.add("Set-Cookie", "C=D") >>> h["set-cookie"] 'A=B,C=D' >>> h.get_list("set-cookie") ['A=B', 'C=D'] >>> for (k,v) in sorted(h sorted(h.get_all()): ... print('%s: %s' % (k,v)) ...Content-Type: text/html Set-Cookie: A=B Set-Cookie: C=D add(name: str [https://docs.python.org/3/library/stdtypes.html#str], value: str [https://docs0 码力 | 437 页 | 405.14 KB | 3 月前3
Guzzle PHP 5.3 Documentationrepresented this way (e.g., Set-Cookie), you can pass an optional flag to the getHeader() method to retrieve the header values as an array. $values = $response->getHeader('Set-Cookie', true); foreach ($values0 码力 | 63 页 | 275.75 KB | 11 月前3
Guzzle PHP 5.3 Documentationrepresented this way (e.g., Set-Cookie), you can pass an optional flag to the getHeader() method to retrieve the header values as an array. $values = $response->getHeader('Set-Cookie', true); foreach ($values0 码力 | 72 页 | 312.62 KB | 11 月前3
Python 标准库参考指南 2.7.18 and port cookie-attributes introduced with RFC 2965. 注解: The various named parameters found in Set-Cookie and Set-Cookie2 headers (eg. domain and expires) are conventionally referred to as attributes. rules for Netscape and RFC 2965 cook- ies. By default, RFC 2109 cookies (ie. cookies received in a Set-Cookie header with a version cookie- attribute of 1) are treated according to the RFC 2965 rules. However Library Reference, 发布 2.7.18 RFC 2109 - HTTP State Management Mechanism Obsoleted by RFC 2965. Uses Set-Cookie with version=1. RFC 2965 - HTTP State Management Mechanism The Netscape protocol with the bugs0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 and port cookie-attributes introduced with RFC 2965. 注解: The various named parameters found in Set-Cookie and Set-Cookie2 headers (eg. domain and expires) are conventionally referred to as attributes. rules for Netscape and RFC 2965 cook- ies. By default, RFC 2109 cookies (ie. cookies received in a Set-Cookie header with a version cookie- attribute of 1) are treated according to the RFC 2965 rules. However Library Reference, 发布 2.7.18 RFC 2109 - HTTP State Management Mechanism Obsoleted by RFC 2965. Uses Set-Cookie with version=1. RFC 2965 - HTTP State Management Mechanism The Netscape protocol with the bugs0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 2.7.18 and port cookie-attributes introduced with RFC 2965. 注解: The various named parameters found in Set-Cookie and Set-Cookie2 headers (eg. domain and expires) are conventionally referred to as attributes. rules for Netscape and RFC 2965 cook- ies. By default, RFC 2109 cookies (ie. cookies received in a Set-Cookie header with a version cookie- attribute of 1) are treated according to the RFC 2965 rules. However Library Reference, 发布 2.7.18 RFC 2109 - HTTP State Management Mechanism Obsoleted by RFC 2965. Uses Set-Cookie with version=1. RFC 2965 - HTTP State Management Mechanism The Netscape protocol with the bugs0 码力 | 1552 页 | 7.42 MB | 9 月前3
Python 标准库参考指南 3.6.15 CookieError Exception failing because of RFC 2109 invalidity: incorrect attributes, incorrect Set-Cookie header, etc. class http.cookies.BaseCookie([input]) This class is a dictionary-like object whose value_decode() are inverses on the range of value_decode. BaseCookie.output(attrs=None, header=’Set-Cookie:’, sep=’\r\n’) Return a string representation suitable to be sent as HTTP headers. attrs and header isReservedKey(K) Whether K is a member of the set of keys of a Morsel. Morsel.output(attrs=None, header=’Set-Cookie:’) Return a string representation of the Morsel, suitable to be sent as an HTTP header. By default0 码力 | 1886 页 | 8.95 MB | 9 月前3
Python 标准库参考指南 3.6.15 CookieError Exception failing because of RFC 2109 invalidity: incorrect attributes, incorrect Set-Cookie header, etc. class http.cookies.BaseCookie([input]) This class is a dictionary-like object whose value_decode() are inverses on the range of value_decode. BaseCookie.output(attrs=None, header=’Set-Cookie:’, sep=’\r\n’) Return a string representation suitable to be sent as HTTP headers. attrs and header isReservedKey(K) Whether K is a member of the set of keys of a Morsel. Morsel.output(attrs=None, header=’Set-Cookie:’) Return a string representation of the Morsel, suitable to be sent as an HTTP header. By default0 码力 | 1886 页 | 8.95 MB | 9 月前3
Python 标准库参考指南 3.7.13 效数据的准备,并在解析时捕获CookieError。 exception http.cookies.CookieError 出现异常的原因,可能是不符合 RFC 2109 :属性不正确、Set-Cookie 头部信息不正确等等。 class http.cookies.BaseCookie([input]) 类似字典的对象,字典键为字符串,字典值是Morsel 实例。请注意,在将键值关联时,首先会把 value_decode 的取值范围内,value_encode() 和value_decode() 应为可互逆操作。 BaseCookie.output(attrs=None, header=’Set-Cookie:’, sep=’\r\n’) 返回可作为 HTTP 标头信息发送的字符串表示。attrs 和 header 会传给每个Morsel 的output() 方 法。sep 用来将标头连接在一起,默认为 是否属于Morsel 的键。 Morsel.output(attrs=None, header=’Set-Cookie:’) 返回 morsel 的字符串形式,适用于作为 HTTP 头部信息进行发送。默认包含所有属性,除非给出 attrs 属性列表。header 默认为 "Set-Cookie:"。 Morsel.js_output(attrs=None) 返回一段可供嵌入的 JavaScript0 码力 | 1846 页 | 9.09 MB | 9 月前3
共 24 条
- 1
- 2
- 3













