Built-in sandbox SHIM: a urllib3-compatible module for the model's Python
sandbox, implemented as a thin wrapper over the already-installed requests
shim (which rides the sandbox socket via stdlib urllib and honours the network
guard). No pip, no native wheel, no host bridge.
The preamble publishes a urllib3 module (plus urllib3.exceptions) into
sys.modules and staples it onto builtins. It exposes the surface agents
reach for: PoolManager / HTTPConnectionPool / HTTPSConnectionPool with
.request(method, url, fields=, headers=, body=, json=), a top-level
urllib3.request(...) (urllib3 2.x), an HTTPResponse (.status, .data,
.headers, .json(), .read(), .getheader()), HTTPHeaderDict,
disable_warnings(), and the urllib3.exceptions tree (HTTPError,
MaxRetryError, NewConnectionError, ReadTimeoutError, ProtocolError,
InsecureRequestWarning). Real connection pooling / retries are no-ops.
Built-in sandbox SHIM: a `urllib3`-compatible module for the model's Python sandbox, implemented as a thin wrapper over the already-installed `requests` shim (which rides the sandbox socket via stdlib urllib and honours the network guard). No pip, no native wheel, no host bridge. The preamble publishes a `urllib3` module (plus `urllib3.exceptions`) into `sys.modules` and staples it onto builtins. It exposes the surface agents reach for: `PoolManager` / `HTTPConnectionPool` / `HTTPSConnectionPool` with `.request(method, url, fields=, headers=, body=, json=)`, a top-level `urllib3.request(...)` (urllib3 2.x), an `HTTPResponse` (`.status`, `.data`, `.headers`, `.json()`, `.read()`, `.getheader()`), `HTTPHeaderDict`, `disable_warnings()`, and the `urllib3.exceptions` tree (`HTTPError`, `MaxRetryError`, `NewConnectionError`, `ReadTimeoutError`, `ProtocolError`, `InsecureRequestWarning`). Real connection pooling / retries are no-ops.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |