HTTPGet with headers and parameters

  • My apologies first, I'm not a programmer by trade, I can hack together and follow examples along pretty well, but sometimes I get stumped. Does the urequest library not have the means to pass the parameters for the query like below. I need to pass the header information for the API key and then I need to pass the parameters, the stock symbol and the type of quote I am looking for. Below is the snippet of code from RapidAPI. I was trying to get this to work in UIFlow and I've gotten most of it, but I'm stumped on how to pass the query parameters. Maybe there's an easier way all together. Just wanted to do a simple stock ticker. At the moment, it returns a message :This API function () does not exist

    Snippet from Rapidapi:
    import requests

    url = ""
    querystring = {"symbol":"TSLA","function":"GLOBAL_QUOTE"}

    headers = {
    'x-rapidapi-host': "",
    'x-rapidapi-key': "XXXXXXXX"
    response = requests.request("GET", url, headers=headers, params=querystring)

    Snippet from UIflow:

    from m5stack import *
    from m5ui import *
    from uiflow import *
    import urequests
    import time


    while True:
    req = urequests.request(method='GET', url='', headers={'x-rapidapi-host':'','x-rapidapi-key':'xxxxx'})
    lcd.print('success', 0, 0, 0xffffff)
    lcd.print((req.text), 0, 0, 0xffffff)
    lcd.print('CRAPPED OUT', 0, 0, 0xffffff)