def create_cookie(self, delete=None):
value = '<STR_LIT>' if delete else self._serialize(self.data)<EOL>split_url = parse.urlsplit(self.adapter.url)<EOL>domain = split_url.netloc.split('<STR_LIT::>')[<NUM_LIT:0>]<EOL>if '<STR_LIT:.>' not in domain:<EOL><INDENT>template = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>template = ('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>return template.format(<EOL>name=self.name,<EOL>value=value,<EOL>domain=domain,<EOL>path=split_url.path,<EOL>secure='<STR_LIT>' if self.secure else '<STR_LIT>',<EOL>expires='<STR_LIT>' if delete else '<STR_LIT>'<EOL>)<EOL>
Creates the value for ``Set-Cookie`` HTTP header.

:param bool delete:
    If ``True`` the cookie value will be ``deleted`` and the
    Expires value will be ``Thu, 01-Jan-1970 00:00:01 GMT``.