Ejemplo n.º 1
0
 def accept(self):
     return Accept.from_header(header=self.environ.get("HTTP_ACCEPT"))
Ejemplo n.º 2
0
 def accept(self):
     header = self.headers.get("Accept")
     if header is not None:
         header = ",".join(header)
     return Accept.from_header(header=header)
Ejemplo n.º 3
0
 def test_accept(self):
     accept = "application/json"
     request = self.make_request(headers=Headers([("accept", [accept])]))
     self.assertEqual(request.accept, Accept.from_header(accept))
Ejemplo n.º 4
0
 def test_accept(self):
     accept = "application/json"
     request = self.make_request(headers=Headers([("accept", [accept])]))
     self.assertEqual(request.accept, Accept.from_header(accept))
Ejemplo n.º 5
0
 def accept(self):
     header = self.headers.get("Accept")
     if header is not None:
         header = ",".join(header)
     return Accept.from_header(header=header)
Ejemplo n.º 6
0
 def accept(self):
     return Accept.from_header(header=self.environ.get("HTTP_ACCEPT"))