':rtype: Union[bytes, None]'

@property
def request_data_encoded(self):

    if isinstance(self.request_data, str):
        return self.request_data.encode(encoding=(self.request_data_encoding or 'utf-8'))
    else:
        return self.request_data
