Пример #1
0
 def scheme(self):
     """
     HTTP request scheme, which should be "http" or "https".
     """
     if not self.data.scheme:
         return self.data.scheme
     return message._native(self.data.scheme)
Пример #2
0
 def scheme(self):
     """
     HTTP request scheme, which should be "http" or "https".
     """
     if not self.data.scheme:
         return self.data.scheme
     return message._native(self.data.scheme)
Пример #3
0
 def path(self):
     """
     HTTP request path, e.g. "/index.html".
     Guaranteed to start with a slash, except for OPTIONS requests, which may just be "*".
     """
     if self.data.path is None:
         return None
     else:
         return message._native(self.data.path)
Пример #4
0
 def path(self):
     """
     HTTP request path, e.g. "/index.html".
     Guaranteed to start with a slash, except for OPTIONS requests, which may just be "*".
     """
     if self.data.path is None:
         return None
     else:
         return message._native(self.data.path)
Пример #5
0
 def method(self):
     """
     HTTP request method, e.g. "GET".
     """
     return message._native(self.data.method).upper()
Пример #6
0
 def reason(self):
     """
     HTTP Reason Phrase, e.g. "Not Found".
     This is always :py:obj:`None` for HTTP2 requests, because HTTP2 responses do not contain a reason phrase.
     """
     return message._native(self.data.reason)
Пример #7
0
 def reason(self):
     """
     HTTP Reason Phrase, e.g. "Not Found".
     This is always :py:obj:`None` for HTTP2 requests, because HTTP2 responses do not contain a reason phrase.
     """
     return message._native(self.data.reason)
Пример #8
0
 def method(self):
     """
     HTTP request method, e.g. "GET".
     """
     return message._native(self.data.method).upper()