Skip to content

port70.response

Response object for port70.

Response dataclass

Response(
    uri: GopherURI,
    raw_bytes: bytes,
    encoding: str = "utf-8",
)

Represents a response received from a Gopher server.

content property

content: bytes

Raw response bytes.

encoding class-attribute instance-attribute

encoding: str = 'utf-8'

Encoding used to decode text (default: 'utf-8').

is_text property

is_text: bool

True if the item type represents text content (text, menu, search).

item_type property

item_type: str

Gopher item type of the request.

lines property

lines: list[str]

Response text split into lines.

raw_bytes instance-attribute

raw_bytes: bytes

Raw bytes received from the server.

text property

text: str

Response content decoded as text.

uri instance-attribute

uri: GopherURI

The requested Gopher URI.