You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classHttpRequestParser:
def__init__(self, protocol):
"""HttpRequestParser protocol -- a Python object with the following methods (all optional): - on_message_begin() - on_header(name: bytes, value: bytes) - on_headers_complete() - on_body(body: bytes) - on_message_complete() - on_chunk_header() - on_chunk_complete() """defget_http_version(self) ->str:
"""Return an HTTP protocol version."""defshould_keep_alive(self) ->bool:
"""Return ``True`` if keep-alive mode is preferred."""deffeed_data(self, data: bytes):
"""Feed data to the parser. Will eventually trigger callbacks on the ``protocol`` object. On HTTP upgrade, this method will raise an ``HttpParserUpgrade`` exception, with its sole argument set to the offset of the non-HTTP data in ``data``. """defget_method(self) ->bytes:
"""Return HTTP request method (GET, HEAD, etc)"""classHttpResponseParser:
"""Has all methods except ``get_method()`` that HttpRequestParser has."""defget_status_code(self) ->int:
"""Return the status code of the HTTP response"""defparse_url(url: bytes):
"""Parse URL strings into a structured Python object. Returns an instance of ``httptools.URL`` class with the following attributes: - schema: bytes - host: bytes - port: int - path: bytes - query: bytes - fragment: bytes - userinfo: bytes """
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: