'warningsAccepted=true header parameter in Python

I am using an api, where it give some of the api related warning. To bypass the api warnings, I am trying to use " warningsAccepted=True" in the url header. I have tried below code. However, this did not fix my issue. Could you please help me to fix issue.

url="https://example.com"
    headers = {
        'Authorization': 'bearer %s' %bearer_token, 
        'Content-Type': 'application/ld+json',
        'warning-accepted': True
    }
    
    response = requests.request("POST", url, headers=headers)

error message:

InvalidHeader: Value for header {warningsAccepted: True} must be of type str or bytes, not <class 'bool'>



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source