mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Add tests for snippets in docs (#1264)
This commit is contained in:
@@ -72,7 +72,7 @@ Now that we have installed the dependencies, we need to patch the Requests libra
|
||||
|
||||
<py-script>
|
||||
import pyodide_http
|
||||
pyodide_http.patch()
|
||||
pyodide_http.patch_all()
|
||||
</py-script>
|
||||
</body>
|
||||
</html
|
||||
@@ -104,7 +104,7 @@ Finally, let's make a request to the JSON Placeholder API to confirm that everyt
|
||||
import pyodide_http
|
||||
|
||||
# Patch the Requests library so it works with Pyscript
|
||||
pyodide_http.patch()
|
||||
pyodide_http.patch_all()
|
||||
|
||||
# Make a request to the JSON Placeholder API
|
||||
response = requests.get("https://jsonplaceholder.typicode.com/todos")
|
||||
|
||||
Reference in New Issue
Block a user