Skip to content

Commit

Permalink
Support byte RequestBodySimpleParameter (#101)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugues Martel <[email protected]>
  • Loading branch information
hmartel and hmartel-alertlogic authored Oct 27, 2021
1 parent a8a08ed commit 8c156e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion almdrlib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __init__(self, name, schema, required=False, session=None):

def serialize(self, kwargs, header=None):
data = kwargs.pop(self.name, "")
if self._format == 'binary':
if self._format == 'binary' and not isinstance(data, bytes):
kwargs['data'] = data.encode()
else:
kwargs['data'] = data
Expand Down

0 comments on commit 8c156e9

Please sign in to comment.