Skip to main content

Practice · 1 of 1

Fetch with an Injected Transport

CHALLENGE
Difficulty: intermediate+25 XP

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).

Back to lesson: Practice: Transport Injection Drills