code: def set_cookie(self, key, value, domain=None, path='/', secure=False,
                     httponly=True):
          
          self._cookies[key] = value
          if domain:
              self._cookies[key]['domain'] = domain
          if path:
              self._cookies[key]['path'] = path
          if secure:
              self._cookies[key]['secure'] = secure
          if httponly:
              self._cookies[key]['httponly'] = httponly
docs: Set a cookie.
  
          Args:
              key (:obj:`str`): Cookie name
              value (:obj:`str`): Cookie value
              domain (:obj:`str`): Cookie domain
              path (:obj:`str`): Cookie value
              secure (:obj:`bool`): True if secure, False otherwise
              httponly (:obj:`bool`): True if it's a HTTP only cookie, False
                  otherwise