コード例 #1
0
ファイル: http.py プロジェクト: RahulPande90/burst
 def bind(self, r):
   """Bind the Request to another one. This method will copy the supplied
   request's cookies and response set-cookies to the Request."""
   r_new = self.copy()
   for c in r.get_header('Cookie'):
     r_new.add_header('Cookie', c)
   if r.response:
     cookies = []
     for c in r.response.get_header('Set-Cookie'):
       cookies.append(Cookie.parse(c, set_cookie=True))
     r_new.add_header('Cookie', "; ".join([str(x) for x in cookies]))
   return r_new
コード例 #2
0
 def bind(self, r):
     """Bind the Request to another one. This method will copy the supplied
 request's cookies and response set-cookies to the Request."""
     r_new = self.copy()
     for c in r.get_header('Cookie'):
         r_new.add_header('Cookie', c)
     if r.response:
         cookies = []
         for c in r.response.get_header('Set-Cookie'):
             cookies.append(Cookie.parse(c, set_cookie=True))
         r_new.add_header('Cookie', "; ".join([str(x) for x in cookies]))
     return r_new
コード例 #3
0
ファイル: http.py プロジェクト: RahulPande90/burst
 def cookies(self):
   cookies = []
   for h in self.get_header("Cookie"):
     cookies.extend(Cookie.parse(h))
   return cookies
コード例 #4
0
ファイル: http.py プロジェクト: RahulPande90/burst
 def cookies(self):
   cookies = []
   for h in self.get_header("Set-Cookie"):
     cookies.append(Cookie.parse(h, set_cookie=True))
   return cookies
コード例 #5
0
 def cookies(self):
     cookies = []
     for h in self.get_header("Set-Cookie"):
         cookies.append(Cookie.parse(h, set_cookie=True))
     return cookies
コード例 #6
0
 def cookies(self):
     cookies = []
     for h in self.get_header("Cookie"):
         cookies.extend(Cookie.parse(h))
     return cookies