How do I make an api request from the anvil lserver?
Normal python code would be:
import requests
x = requests.get(url, params = {“sentence”: “Elon Musk launches the Falcon around November despite failing multiple times reported The Times”})
print(x.text)
But from the Anvil docuemtnation I need to do something like this:
import anvil.http
resp = anvil.http.request(url)
print(f"Response MIME type: {resp.content_type}")
I can’t get that to work & I have parameters . .