From 8c156e9742c016d3011170e5b10867cd2d28dff9 Mon Sep 17 00:00:00 2001 From: hmartel Date: Wed, 27 Oct 2021 08:01:43 -0500 Subject: [PATCH] Support byte RequestBodySimpleParameter (#101) Co-authored-by: Hugues Martel --- almdrlib/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/almdrlib/client.py b/almdrlib/client.py index 410ad31..bd8fe85 100644 --- a/almdrlib/client.py +++ b/almdrlib/client.py @@ -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