So, I've made a Flask server using Python on REPL and I'm trying to tell people how to use it. To do so, I'm making an example using Python. So far I have:
import requests
baseURL = "https://myurl.repl.co"
x = requests.get(baseURL)
print(x)
But what I get is:
<Response [200]>
Traceback (most recent call last): File "main.py", line 6, in <module> print(x[0]) TypeError: 'Response' object is not subscriptable
Does anyone know how to properly make a GET request to the server? Thanks!
import requests
baseURL = "https://myurl.repl.co"
x = requests.get(baseURL)
print(x.content)