codekingpro/portable-devtools
115k
1from typing import Protocol
2
3
4class HTTPProtocol(Protocol):
5 """Used for providing static type-checking when parsing through the http protocol"""
6
7 def on_message_begin() -> None: ...
8 def on_url(url: bytes) -> None: ...
9 def on_header(name: bytes, value: bytes) -> None: ...
10 def on_headers_complete() -> None: ...
11 def on_body(body: bytes) -> None: ...
12 def on_message_complete() -> None: ...
13 def on_chunk_header() -> None: ...
14 def on_chunk_complete() -> None: ...
15 def on_status(status: bytes) -> None: ...
16 