PHP 8.2.30
Preview: request.py Size: 566 B
/opt/hc_python/lib64/python3.12/site-packages/urllib3/contrib/emscripten/request.py

from __future__ import annotations

from dataclasses import dataclass, field

from ..._base_connection import _TYPE_BODY


@dataclass
class EmscriptenRequest:
    method: str
    url: str
    params: dict[str, str] | None = None
    body: _TYPE_BODY | None = None
    headers: dict[str, str] = field(default_factory=dict)
    timeout: float = 0
    decode_content: bool = True

    def set_header(self, name: str, value: str) -> None:
        self.headers[name.capitalize()] = value

    def set_body(self, body: _TYPE_BODY | None) -> None:
        self.body = body

Directory Contents

Dirs: 1 × Files: 6

Name Size Perms Modified Actions
- drwxr-xr-x 2025-04-04 08:01:58
Edit Download
8.57 KB lrw-r--r-- 2025-04-04 08:01:57
Edit Download
3.57 KB lrw-r--r-- 2025-04-04 08:01:57
Edit Download
22.33 KB lrw-r--r-- 2025-04-04 08:01:57
Edit Download
566 B lrw-r--r-- 2025-04-04 08:01:57
Edit Download
9.75 KB lrw-r--r-- 2025-04-04 08:01:57
Edit Download
733 B lrw-r--r-- 2025-04-04 08:01:57
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).