Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apimatic_core/utilities/api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ def form_encode(obj,
retval += ApiHelper.form_encode(obj[item], instance_name + "[" + item + "]", array_serialization,
is_query)
else:
if isinstance(obj, bool):
obj = str(obj).lower()
retval.append((instance_name, obj))

return retval
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='apimatic-core',
version='0.2.4',
version='0.2.5',
description='A library that contains core logic and utilities for '
'consuming REST APIs using Python SDKs generated by APIMatic.',
long_description=long_description,
Expand Down
4 changes: 2 additions & 2 deletions tests/apimatic_core/utility_tests/test_api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def test_append_url_with_query_parameters_value_error(self, input_url, input_que
({'query_param': "string",
'query_param2': True,
'query_param3': [1, 2, 3]
}, 'query_param=string&query_param2=True&query_param3[0]=1&query_param3[1]=2&query_param3[2]=3',
}, 'query_param=string&query_param2=true&query_param3[0]=1&query_param3[1]=2&query_param3[2]=3',
SerializationFormats.INDEXED)
])
def test_process_complex_query_parameters(self, input_query_params, expected_query_param_value,
Expand Down Expand Up @@ -521,7 +521,7 @@ def test_form_params(self, input_form_param_value, expected_form_param_value, ar
'form_param3': {'key': 'string_val'},
}, [('form_param1', 'string'),
('form_param2[0]', 'string'),
('form_param2[1]', True),
('form_param2[1]', 'true'),
('form_param3[key]', 'string_val')], SerializationFormats.INDEXED)
])
def test_form_encode_parameters(self, input_form_param_value, expected_form_param_value,
Expand Down