import requests
from requests.exceptions import HTTPError

try:

    dataToPass ={
    "RunId": "00000-22222",
    "AUC": '70.23',
    "Accuracy": '90.2222',
    "Arguments": "penalty: 1111",
    "TrainingContext": "Logistic ",
    "RunStatus": '3'
}

    response = requests.post(url='http://localhost:8002/add',
                             json=dataToPass)
    response.raise_for_status()
    # access JSOn content
    jsonResponse = response.json()
    print(jsonResponse)

except HTTPError as http_err:
    print(f'HTTP error occurred: {http_err}')
except Exception as err:
    print(f'Other error occurred: {err}')
