from threading import  Thread

import requests


def test():
    request_data = {
        "fromCity": "ATL", "toCity": "AUS", "fromDate": "2023-11-30", "method": "shopping",
        "flightOption": "oneWay", "adultNumber": 2, "childNumber": 0,
    }
    # webs.request_url = "http://ymx-lcc.unififi.com/ew/shop/rev-vis/shopping"
    request_url = "http://lcc.unififi.com/f9/shop/rev-vis/shopping"
    # webs.request_url = "http://52.52.23.116/f9/shop/rev-vis/shopping"
    # request_url = "http://127.0.0.1:52041/f9/shop/rev-vis/shopping"
    r = requests.post(url=request_url, json=request_data)
    print(r.text)


if __name__ == '__main__':
    for i in range(10):
        ths = []
        for i in range(2):
            t = Thread(target=test, args=())
            t.start()
            ths.append(t)
        for th in ths:
            th.join()