import requests
import threading

def send_request():
    url = "http://localhost:8081"
    try:
        response = requests.get(url)
        response.raise_for_status()
        print(f"Response from {url}: {response.text}")
    except requests.exceptions.RequestException as e:
        print(f"Request to {url} failed: {e}")

def send_multiple_requests(n):
    threads = []
    for _ in range(n):
        thread = threading.Thread(target=send_request)
        threads.append(thread)
        thread.start()

    for thread in threads:
        thread.join()

if __name__ == '__main__':
    number_of_requests = 10  # Change this number to send more or fewer requests
    send_multiple_requests(number_of_requests)