GNU Info

Info Node: (python2.1-lib.info)Cookie Objects

(python2.1-lib.info)Cookie Objects


Next: Morsel Objects Prev: Cookie Up: Cookie
Enter node , (file) or (file)node

Cookie Objects
--------------

`value_decode(val)'
     Return a decoded value from a string representation. Return value
     can be any type. This method does nothing in `BaseCookie' -- it
     exists so it can be overridden.

`value_encode(val)'
     Return an encoded value. VAL can be any type, but return value
     must be a string. This method does nothing in `BaseCookie' -- it
     exists so it can be overridden

     In general, it should be the case that `value_encode()' and
     `value_decode()' are inverses on the range of VALUE_DECODE.

`output([attrs[, header[, sep]]])'
     Return a string representation suitable to be sent as HTTP headers.
     ATTRS and HEADER are sent to each `Morsel''s `output()' method.
     SEP is used to join the headers together, and is by default a
     newline.

`js_output([attrs])'
     Return an embeddable JavaScript snippet, which, if run on a
     browser which supports JavaScript, will act the same as if the
     HTTP headers was sent.

     The meaning for ATTRS is the same as in `output()'.

`load(rawdata)'
     If RAWDATA is a string, parse it as an `HTTP_COOKIE' and add the
     values found there as `Morsel's. If it is a dictionary, it is
     equivalent to:

          for k, v in rawdata.items():
              cookie[k] = v


automatically generated by info2www version 1.2.2.9