Skip to main content

Practice ยท 1 of 1

Fetch with an Injected Transport

Implement get_status(base_url, path, transport=None) that composes url = base_url + path, calls transport(url) (default transport raises RuntimeError('no network in sandbox')) expecting an object with attributes .status and .read(), and returns (status, parsed-json-body).

Difficulty: intermediate

Back to lesson: Practice: Transport Injection Drills