Skip to content

Is Brython is planned to use Fetch API ? #2425

Closed Answered by PierreQuentel
BobSquarePants asked this question in Q&A
Discussion options

You must be logged in to vote

You can use fetch() like any other function in the global Javascript namespace:

from browser import window, aio

async def fetch(url):
    resp = await window.fetch(url)
    print(await resp.text())

aio.run(fetch('test.html'))

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@BobSquarePants
Comment options

Answer selected by BobSquarePants
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants