http.cookies.Morsel

class http.cookies.Morsel

Abstract a key/value pair, which has some RFC 2109 attributes.

Morsels are dictionary-like objects, whose set of keys is constant — the valid RFC 2109 attributes, which are

  • expires
  • path
  • comment
  • domain
  • max-age
  • secure
  • version
  • httponly

The attribute httponly specifies that the cookie is only transferred in HTTP requests, and is not accessible through JavaScript. This is intended to mitigate some forms of cross-site scripting.

The keys are case-insensitive and their default value is ''.

Changed in version 3.5: __eq__() now takes key and value into account.

doc_python
2016-10-07 17:34:08
Comments
Leave a Comment

Please login to continue.