MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

wasm/demo/snippets/asyncbrowser.py:5–12  ·  view source on GitHub ↗
(delay)

Source from the content-addressed store, hash-verified

3
4
5async def main(delay):
6 url = f"https://httpbin.org/delay/{delay}"
7 print(f"fetching {url}...")
8 res = await browser.fetch(
9 url, response_format="json", headers={"X-Header-Thing": "rustpython is neat!"}
10 )
11 print(f"got res from {res['url']}:")
12 print(res, end="\n\n")
13
14
15for delay in range(3):

Callers 1

asyncbrowser.pyFile · 0.70

Calls 2

fetchMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected