Python API Test
API
import requests
url = "https://random-math-problem.p.rapidapi.com/random-problem"
querystring = {"type":"html"}
headers = {
"X-RapidAPI-Key": "8677538c65mshfd1d85d7adf047fp17a8a1jsn7a54a04df28c",
"X-RapidAPI-Host": "random-math-problem.p.rapidapi.com"
}
response = requests.request("GET", url, headers=headers, params=querystring)
title = response.json().get('title')
problem = response.json().get('problem')
print("Printing response.text")
print(response.text)
print("Printing response.json()")
print(response.json())
print("Printing a title")
print(title)
print("Printing a problem")
print(problem)